Posted
almost 11 years
ago
by
ChristophWille
We have added a new open-source project to our portfolio - the Resource-First Translations (RFT) application, which provides translators of SharpDevelop with a modern and fast experience for helping us by translating SharpDevelop into a language they
... [More]
speak.
This new application has a couple of goals (taken from the RFT GH readme):
Code-First Developers live in the IDE and work directly with resource files. Source control is the source of truth for resources.
Multi-Branch Translations come and go with features being added, modified or removed. Translators should never duplicate work.
Multi-File Complex software doesn't ship with a single resource file only. Slice your application into modules and still get the benefits of translating only once.
Sync Automatically get the latest resource file checkins to the translators, and the finished translations to the developers or the build servers.
Developers work in the environment they are used to - including branching and merging - and translators get a great effortless experience for translating as well as testing translations. If you want to see that for yourself, either
Check out the Youtube videos for translators and administrators
...and/or log in to the demo installation we provide (see RFT readme)
The demo installation is actually quite interesting as it runs on Azure Websites (SQL Azure, with Web Jobs and SendGrid for email), whereas in contrast our production installation for SharpDevelop runs on a dedicated box at a hosting facility (SQL Server 2012, with standard scheduled tasks and standard SMTP).
If you like what you see, feel free to grab a copy and use it for your own purposes! All you basically need is ASP.NET and a SQL Server database to get going. As for grabbing the translated resource files in a real-world project, check out the ResGet integration in SharpDevelop (we don't do build integration).
Bootnote: we talked about replacing the old ASP-based application for way too long (a solution I'd never open source simply for being way too ashamed of the code quality). But at least it provided us with a list of things we must have to have a great experience going forward. [Less]
|
Posted
almost 11 years
ago
by
MattWard
SharpDevelop has had support for code coverage for a while now thanks to PartCover and more recently thanks to OpenCover. In SharpDevelop 5 an external contributor added support for showing branch coverage in the text editor. Branch coverage will
... [More]
show you whether all paths or branches through the code have been executed by your tests. So let us take a look at this in SharpDevelop 5.
Branch Coverage
First let us start with an existing C# project that has some unit tests for a BankAccount class. The source code and associated project is available as a .zip file to download.
Our BankAccount class is shown below.
public class BankAccount
{
decimal balance;
public void Deposit(decimal amount)
{
balance += amount;
}
public decimal Balance {
get { return balance; }
}
public void Withdraw(decimal amount)
{
// TODO.
}
}
Now we will write a unit test for the Withdraw method.
[Test]
public void Withdraw_Deposit20PoundsThenWithdraw5Pounds_BalanceIs15Pounds()
{
var account = new BankAccount();
account.Deposit(20m);
account.Withdraw(5m);
Assert.AreEqual(15m, account.Balance);
}
To get this test working we update the Withdraw method with the code shown below:
public void Withdraw(decimal amount)
{
if (balance >= amount) {
balance -= amount;
}
}
Notice that there is an if statement at the start of the Withdraw method to prevent the account from being overdrawn. Now in SharpDevelop 4, if you ran the unit tests with code coverage, the Withdraw method would show 100% statement coverage. However the unit tests currently do not execute the path through the code where the amount being withdrawn is greater than the current balance. In SharpDevelop 5 the new branch coverage feature allows you to see this code is not fully covered. In SharpDevelop 5, right click the unit tests and select Run with code coverage.
Now if you open the BankAccount class into the text editor you should see the following:
The code highlighted in yellow shows you that all possible branches through this code have not been executed. Once another unit test is added that tries to to withdraw an amount larger than the current balance then all the code in the BankAccount will be highlighted in green showing that all the branches are covered.
Finally the colour used to highlight the code in the partially covered branch can be configured by selecting Options from the Tools menu to open the Options dialog.
That is the end to this brief introduction to branch coverage in SharpDevelop 5. [Less]
|
Posted
almost 11 years
ago
by
MattWard
SharpDevelop has had support for code coverage for a while now thanks to PartCover and more recently thanks to OpenCover. In SharpDevelop 5 an external contributor added support for showing branch coverage in the text editor. Branch coverage will
... [More]
show you whether all paths or branches through the code have been executed by your tests. So let us take a look at this in SharpDevelop 5.
Branch Coverage
First let us start with an existing C# project that has some unit tests for a BankAccount class. The source code and associated project is available as a .zip file to download.
Our BankAccount class is shown below.
public class BankAccount
{
decimal balance;
public void Deposit(decimal amount)
{
balance += amount;
}
public decimal Balance {
get { return balance; }
}
public void Withdraw(decimal amount)
{
// TODO.
}
}
Now we will write a unit test for the Withdraw method.
[Test]
public void Withdraw_Deposit20PoundsThenWithdraw5Pounds_BalanceIs15Pounds()
{
var account = new BankAccount();
account.Deposit(20m);
account.Withdraw(5m);
Assert.AreEqual(15m, account.Balance);
}
To get this test working we update the Withdraw method with the code shown below:
public void Withdraw(decimal amount)
{
if (balance >= amount) {
balance -= amount;
}
}
Notice that there is an if statement at the start of the Withdraw method to prevent the account from being overdrawn. Now in SharpDevelop 4, if you ran the unit tests with code coverage, the Withdraw method would show 100% statement coverage. However the unit tests currently do not execute the path through the code where the amount being withdrawn is greater than the current balance. In SharpDevelop 5 the new branch coverage feature allows you to see this code is not fully covered. In SharpDevelop 5, right click the unit tests and select Run with code coverage.
Now if you open the BankAccount class into the text editor you should see the following:
The code highlighted in yellow shows you that all possible branches through this code have not been executed. Once another unit test is added that tries to to withdraw an amount larger than the current balance then all the code in the BankAccount will be highlighted in green showing that all the branches are covered.
Finally the colour used to highlight the code in the partially covered branch can be configured by selecting Options from the Tools menu to open the Options dialog.
That is the end to this brief introduction to branch coverage in SharpDevelop 5. [Less]
|
Posted
almost 11 years
ago
by
MattWard
SharpDevelop has had support for code coverage for a while now thanks to PartCover and more recently thanks to OpenCover. In SharpDevelop 5 an external contributor added support for showing branch coverage in the text editor. Branch coverage will
... [More]
show you whether all paths or branches through the code have been executed by your tests. So let us take a look at this in SharpDevelop 5.
Branch Coverage
First let us start with an existing C# project that has some unit tests for a BankAccount class. The source code and associated project is available as a .zip file to download.
Our BankAccount class is shown below.
public class BankAccount
{
decimal balance;
public void Deposit(decimal amount)
{
balance += amount;
}
public decimal Balance {
get { return balance; }
}
public void Withdraw(decimal amount)
{
// TODO.
}
}
Now we will write a unit test for the Withdraw method.
[Test]
public void Withdraw_Deposit20PoundsThenWithdraw5Pounds_BalanceIs15Pounds()
{
var account = new BankAccount();
account.Deposit(20m);
account.Withdraw(5m);
Assert.AreEqual(15m, account.Balance);
}
To get this test working we update the Withdraw method with the code shown below:
public void Withdraw(decimal amount)
{
if (balance >= amount) {
balance -= amount;
}
}
Notice that there is an if statement at the start of the Withdraw method to prevent the account from being overdrawn. Now in SharpDevelop 4, if you ran the unit tests with code coverage, the Withdraw method would show 100% statement coverage. However the unit tests currently do not execute the path through the code where the amount being withdrawn is greater than the current balance. In SharpDevelop 5 the new branch coverage feature allows you to see this code is not fully covered. In SharpDevelop 5, right click the unit tests and select Run with code coverage.
Now if you open the BankAccount class into the text editor you should see the following:
The code highlighted in yellow shows you that all possible branches through this code have not been executed. Once another unit test is added that tries to to withdraw an amount larger than the current balance then all the code in the BankAccount will be highlighted in green showing that all the branches are covered.
Finally the colour used to highlight the code in the partially covered branch can be configured by selecting Options from the Tools menu to open the Options dialog.
That is the end to this brief introduction to branch coverage in SharpDevelop 5. [Less]
|
Posted
almost 11 years
ago
by
DanielGrunwald
ILSpy 2.2 is available!
ILSpy_2.2.0.1706_Binaries.zipILSpy_2.2.0.1706_Source.zip
It's been more than 2 years since the previous release. The ILSpy core team has been busy with SharpDevelop 5, so we haven't done much on ILSpy -- just some bugfixes.
... [More]
However, we've had several external contributors who have supplied us with a few new features (and lots of bugfixes):
#345: Added option to allow folding on all braces
#345: Added context menu to code view with folding commands
#384: Show all images contained in .ico resource
#423: Decompiling as a Visual Studio project now creates AssemblyInfo file
#467: Added option to display metadata tokens in tree
Fixed lots of decompilation bugs
In the future, our team would like to get back to work on ILSpy. We have some ideas for a new decompiler engine that could fix many of the remaining decompilation issues, and hopefully simplify our code at the same time.
[Less]
|
Posted
almost 11 years
ago
by
DanielGrunwald
ILSpy 2.2 is available!
ILSpy_2.2.0.1706_Binaries.zipILSpy_2.2.0.1706_Source.zip
It's been more than 2 years since the previous release. The ILSpy core team has been busy with SharpDevelop 5, so we haven't done much on ILSpy -- just some bugfixes.
... [More]
However, we've had several external contributors who have supplied us with a few new features (and lots of bugfixes):
#345: Added option to allow folding on all braces
#345: Added context menu to code view with folding commands
#384: Show all images contained in .ico resource
#423: Decompiling as a Visual Studio project now creates AssemblyInfo file
#467: Added option to display metadata tokens in tree
Fixed lots of decompilation bugs
In the future, our team would like to get back to work on ILSpy. We have some ideas for a new decompiler engine that could fix many of the remaining decompilation issues, and hopefully simplify our code at the same time.
[Less]
|
Posted
about 11 years
ago
by
ChristophWille
In order to publically surface a change in the build process of SharpDevelop 5, I'd like to point to a thread from April 19th on the sd-coding mailing list entitled Microsoft Build Tools 2013. (This new dependency is also documented in the section
... [More]
Extended Requirements (building #Develop) on our GH page)
To quote Daniel: "There is also a bit of a bootstrapping problem with this commit: to compile SharpDevelop with SharpDevelop, you need a SharpDevelop version that already includes this change (version 5.0.0.4287 or higher). So you will have to compile SharpDevelop with the .bat files once and install that version. (or alternatively, grab a new installer from the build server when that's up)" [Less]
|
Posted
about 11 years
ago
by
ChristophWille
In an effort to make the (standalone) components of SharpDevelop more discoverable, we created a NuGet package for our Reporting solution. It is available as a pre-relase package, thus you need the -pre switch in the console or ensure that you aren't
... [More]
looking at stable packages only in the Manage Packages dialog.
Additionally, we have split out the Reporting samples into a repository of their own (previously part of the SharpDevelop source code download), where they live side-by-side with the nuspec for SharpDevelop Reporting. The Wiki is currently a direct port of the previous sharpdevelopreports.net site (which now redirects to the Wiki on GH), and not yet fully adapted to the new SharpDevelop 5 screens and usage instructions.
We hope that this will make using our Reporting solution both easier and more enjoyable. [Less]
|
Posted
about 11 years
ago
by
ChristophWille
Up until today, we only had an “internal” mailing list for developers with JCAs on file. Mostly for the reason so everyone knows that when code comes from members of this list, it is safe to be incorporated into the codebase. (release coordination
... [More]
another hot item)
However, we no longer require JCAs for SharpDevelop 5 and beyond (license change info). We mulled the options of opening up the existing list, or creating a new one. Because the existing members might not want to see the extra traffic, we decided that it would be better to invite everyone – existing contributors as well as new and prospective ones – to join on their terms.
The sign up for the mailing list can be found at this URL:
https://lists.sourceforge.net/lists/listinfo/sharpdevelop-coding
What do we expect to see as topics? For one, we think it is extraordinarily important to have a platform to discuss ideas: be it to see if this is something that is generally considered a good idea, whether it has been discussed before, or if someone is already working on it (duplication of work can be avoided). Alas, if you are working on bug fixes or new features, and have questions about the architecture, the testing philosophy and about anything on the internal design, this is the place to go. [Less]
|
Posted
about 11 years
ago
by
Rpinski
There's another cool thing we now present in SharpDevelop 5: A configurable code formatting engine.
The first that you see for from this feature is the new "Reformat" command in editor's context menu:
You can select a block of code and reformat
... [More]
it. If you don't select anything, whole file will be reformatted.
So
becomes
Define your rules
Of course, you may change the way how SD formats your code. The formatting options used generally for your SD installation can be set in options dialog through "Coding" -> "C#" -> "Formatting":
All available settings are organized in expandable groups. At the top you see a preset selection. Presets are predefined profiles for some common coding styles.
To overwrite your current formatting settings with a preset, just select one and click on "Reset to:".
Define solution's rules
One main advantage is the policy system, which allows to not only set global settings, but also define settings which are specific to a certain solution. There's a new entry in every solution file's properties:
Clicking on the "..." button opens the solution's formatting settings dialog:
Initially all settings are set to "(global)", which means they use the same values as defined in global settings. That way you can override some of the settings specifically for your solution.
All solution-specific formatting settings are saved in a <SolutionName>.sln.sdsettings file, which can be added to version control like the solution itself.
Define project's rules
What you just have seen for solutions is also possible on project level: The project settings now have a "Code Formatting" tab:
Initially all settings are set to "(solution)" here, so they inherit what has been defined in solution (which on the other hand can refer to global options). All project-specific formatting rules you set here will be saved along with the project (in a .csproj.sdsettings file) and submitted to version control. [Less]
|