Skip to content

Commit

Permalink
Merge pull request #75 from robinsedlaczek/development
Browse files Browse the repository at this point in the history
Merge branch development into master.
  • Loading branch information
robinsedlaczek authored Apr 7, 2019
2 parents 3981ff5 + da76a92 commit af48915
Show file tree
Hide file tree
Showing 60 changed files with 1,434 additions and 114 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,5 @@ ModelManifest.xml
.paket/paket.exe

# FAKE - F# Make
.fake/
.fake/
/src/Precompiled
10 changes: 5 additions & 5 deletions CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ As the metric to determine how clean/dirty your code is the extension (currently

This method consists of 10 lines of code starting from the initial `{` and ending with `}`. A background color is chosen accordingly:

![](images/config fig1.png)
![](images/config_fig1.png)

Adding a line (by breaking the last statement apart) pushes it into the next "brownfield category", though, and the background color changes:

![](images/config fig2.png)
![](images/config_fig2.png)

## config.json

Currently the information about the "brownfield categories" is stored in a global config file _config.json_ located at `c:\ProgramData\ForceFeedbackProgramming`:
Currently the information about the "brownfield categories" is stored in a global JSON config file _.forcefeedbackprogramming_ located at `c:\ProgramData`:

![](images/config fig3.png)
![](images/config_fig3.png)

A [sample config file](config.json) is stored next to this documentation in the repo. It's structure is simple:
A [sample config file](example/.forcefeedbackprogramming) is stored next to this documentation in the repo. It's structure is simple:

```
{
Expand Down
8 changes: 0 additions & 8 deletions ForceFeedback/ForceFeedback.Rules/Configuration/Global.cs

This file was deleted.

41 changes: 0 additions & 41 deletions ForceFeedback/ForceFeedback.sln

This file was deleted.

18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,26 @@ PS: If you like what you see and have time to spare, you can join us in moving t

You can download the precompiled Visual Studio installer package from the [releases page](https://github.com/robinsedlaczek/ForceFeedbackProgramming/releases/ "Visual Studio Installer Package releases").

## Supported IDEs

### Microsoft Visual Studio

Force Feedback is currently available in Visual Studio only (exactly for VS 2015, 2017 and 2019). Therefore, we deliver a Visual Studio extension that can be found in the VS marketplace [here](https://marketplace.visualstudio.com/items?itemName=RobinSedlaczek.ForceFeedback) and that can be installed via the main menu entry "Tools\Manage Extensions". We update the extension in the marketplace with every stable version. Stable versions on the [releases page](https://github.com/robinsedlaczek/ForceFeedbackProgramming/releases/ "Visual Studio Installer Package releases") are those versions, that are free of any additional version status info (e.g. -alpha, -beta etc.).

### ABAB

The phrase "Visual Studio only" is not really correct. There are some guys who ported the Force Feedback Programming to SAP's [ABAB](https://en.wikipedia.org/wiki/ABAP). We got the hint via Twitter [here](https://twitter.com/ceedee666/status/1106887766221180929). You can find the GitHub repo for the ABAB implementation [here](https://github.com/css-ch/abap-code-feedback).

[!Please be aware that their implementation is no fork of our repo. The guys there are working independent from us currently. Their ABAB AiE integration is not part of our project and we are not responsible. In case of issues and/or questions, please contact them directly.]

### Roadmap

We have the integration for Visual Studio Code and JetBrains Rider on the list!

## Health of master (Release|x86):

[![Build status](https://ci.appveyor.com/api/projects/status/mrnvhtnf9k2xrs4g/branch/master?svg=true)](https://ci.appveyor.com/project/robinsedlaczek/forcefeedbackprogramming/branch/master)

## Wanna chat with us?

You can meet us here: [![Gitter](https://badges.gitter.im/robinsedlaczek/ForceFeedbackProgramming.svg)](https://gitter.im/robinsedlaczek/ForceFeedbackProgramming?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
You can meet us here: [![Gitter](https://badges.gitter.im/robinsedlaczek/ForceFeedbackProgramming.svg)](https://gitter.im/robinsedlaczek/ForceFeedbackProgramming?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
39 changes: 0 additions & 39 deletions config.json

This file was deleted.

File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
19 changes: 19 additions & 0 deletions src/ForceFeedback.Adapters.VisualStudio/CodeBlockOccurrence.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.CodeAnalysis.CSharp.Syntax;
using ForceFeedback.Core;
using System.Collections.Generic;

namespace ForceFeedback.Adapters.VisualStudio
{
internal class CodeBlockOccurrence
{
public CodeBlockOccurrence(BlockSyntax block, List<IFeedback> feedbacks)
{
Block = block;
Feedbacks = feedbacks;
}

public BlockSyntax Block { get; set; }

public List<IFeedback> Feedbacks { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Collections.Generic;

namespace ForceFeedback.Adapters.VisualStudio
{
public static class StringExtensions
{
private static readonly HashSet<string> NewLineMarker = new HashSet<string>
{
"\r\n", "\r", "\n"
};

public static bool IsNewLineMarker(this string value)
{
return value != null && NewLineMarker.Contains(value);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;

namespace ForceFeedback.Adapters.VisualStudio
{
public static class SyntaxNodeExtension
{
public static bool IsSyntaxBlock(this SyntaxNode node)
{
return node.Kind() == SyntaxKind.Block;
}

public static bool IsMethod(this SyntaxNode node)
{
return node.Kind() == SyntaxKind.MethodDeclaration;
}

public static bool IsConstructor(this SyntaxNode node)
{
return node.Kind() == SyntaxKind.ConstructorDeclaration;
}

public static bool IsSetter(this SyntaxNode node)
{
return node.Kind() == SyntaxKind.SetAccessorDeclaration;
}

public static bool IsGetter(this SyntaxNode node)
{
return node.Kind() == SyntaxKind.GetAccessorDeclaration;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="2.9.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="2.9.0" />
<PackageReference Include="Microsoft.CodeAnalysis.EditorFeatures" Version="2.8.2" />
<PackageReference Include="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="2.9.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="2.9.0" />
<PackageReference Include="Microsoft.VisualStudio.Text.UI.Wpf" Version="16.0.467" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ForceFeedback.Core\ForceFeedback.Core.csproj" />
</ItemGroup>

</Project>
Loading

0 comments on commit af48915

Please sign in to comment.