Skip to content

Commit

Permalink
End of line normalisation
Browse files Browse the repository at this point in the history
  • Loading branch information
citizenmatt committed Feb 11, 2013
1 parent 1d84208 commit a4ae88d
Show file tree
Hide file tree
Showing 120 changed files with 16,281 additions and 16,259 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
128 changes: 64 additions & 64 deletions .gitignore
@@ -1,65 +1,65 @@

#OS junk files
[Tt]humbs.db
*.DS_Store

#Visual Studio files
*.[Oo]bj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.opensdf
*.tmp
ipch/
obj/
[Bb]in
[Bb]indebug
[Bb]intests
[Dd]ebug*/
[Rr]elease*/
[Dd]istrib
Ankh.NoLoad

Build/

#Tooling
_ReSharper*/
*.resharper
[Tt]est[Rr]esult*

#Subversion files
.svn

# Office Temp Files
~$*

#generated parser files should not be added!
/src/fsharper/Psi.FSharp/src/Gen

#Visual Studio backup and report files
[Uu]pgrade[Ll]og*
[Bb]ackup*/
_[Uu]pgrade[Rr]eport_[Ff]iles*/

#ignore sublime files
*.sublime-*

#directory for playground

#OS junk files
[Tt]humbs.db
*.DS_Store

#Visual Studio files
*.[Oo]bj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.opensdf
*.tmp
ipch/
obj/
[Bb]in
[Bb]indebug
[Bb]intests
[Dd]ebug*/
[Rr]elease*/
[Dd]istrib
Ankh.NoLoad

Build/

#Tooling
_ReSharper*/
*.resharper
[Tt]est[Rr]esult*

#Subversion files
.svn

# Office Temp Files
~$*

#generated parser files should not be added!
/src/fsharper/Psi.FSharp/src/Gen

#Visual Studio backup and report files
[Uu]pgrade[Ll]og*
[Bb]ackup*/
_[Uu]pgrade[Rr]eport_[Ff]iles*/

#ignore sublime files
*.sublime-*

#directory for playground
playground/
102 changes: 51 additions & 51 deletions README.md
@@ -1,52 +1,52 @@
FSharper
========
This project is an attempt to build a plug-in to support the F# programming language in ReSharper.

Broadly speaking, its goals are to:

* Provide ReSharper with a PSI (lexer+parser+inference engine)
* Provide integration with existing R# features (e.g., navigation, search, etc.)
* Provide OOP-related as well as FP-related services (e.g., type inferencing helpers)

Status
======
**Note:** the plugin is not yet ready to be installed and executed. For now, to see it in action, run the `LexerVisualization` application.

At the moment, we are working towards the 0.1 release, which aims to have a fully (or maybe 95%) compliant lexer covered with tests. What we need is:

* To correctly define known F# constructs in the `.lex`. file (and also in `Tokens.xml`, but see note in the next section).
* To create a sufficient number of lexer tests to ensure everything works.

A correctly working lexer (plus maybe one lexer-based service, e.g., TODO explorer support) would constitute the 0.1 release ([tentative roadmap](https://github.com/JetBrains/FSharper/wiki/Roadmap)).

Building
========
In order to compile the project, you need the following:

* **Visual Studio 2012** (earlier versions are not supported as F# projects are not backward-compatible)
* [ReSharper SDK](http://www.jetbrains.com/resharper/download/index.html) (download and install the MSI package)
* [WiX (Windows Installer for XML)](http://wix.sourceforge.net/)

If you have all of these on the machine, the solution should build out of the box. (If it doesn't, please post an issue on the tracker.)

Please note that, currently, any changes to `Tokens.xml` will need to be processed on our end - this is due to one code generation tool not making it into the SDK (please [vote for it](http://youtrack.jetbrains.com/issue/RSRP-318622)). This mechamism might be reworked at a later time.

Debugging
=========
To debug the plugin, you need to

* Have **ReSharper 7.1** installed for Visual Studio 2012
* Set `Plugin` project as StartUp project
* In the Debug section of the project properties
* Set the start action to "Start external program" and specify the path to your Visual Studio installation e.g. "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe".
* Set the command line arguments to match your debug output directory e.g. "/ReSharper.Internal /ReSharper.Plugin C:\Code\FSharper\bindebug".
* Press F5 and load a F# project

In addition, try running the `LexerVisualization` project - this gives a graphical representation of a file being lexed. You can just type things in or open an existing F# file. If you see valid code turn red - that needs to be fixed.

Contributing
============
Pull requests are most welcome and will be reviewed and integrated as soon as humanly possible. However, please don't commit one-line pull requests, as those just waste everyone's time (feel free to use `--squash` if necessary).
Right now, the bulk of development happens on the `develop` branch, though other branches will be created for various subsystems.

FSharper
========
This project is an attempt to build a plug-in to support the F# programming language in ReSharper.

Broadly speaking, its goals are to:

* Provide ReSharper with a PSI (lexer+parser+inference engine)
* Provide integration with existing R# features (e.g., navigation, search, etc.)
* Provide OOP-related as well as FP-related services (e.g., type inferencing helpers)

Status
======
**Note:** the plugin is not yet ready to be installed and executed. For now, to see it in action, run the `LexerVisualization` application.

At the moment, we are working towards the 0.1 release, which aims to have a fully (or maybe 95%) compliant lexer covered with tests. What we need is:

* To correctly define known F# constructs in the `.lex`. file (and also in `Tokens.xml`, but see note in the next section).
* To create a sufficient number of lexer tests to ensure everything works.

A correctly working lexer (plus maybe one lexer-based service, e.g., TODO explorer support) would constitute the 0.1 release ([tentative roadmap](https://github.com/JetBrains/FSharper/wiki/Roadmap)).

Building
========
In order to compile the project, you need the following:

* **Visual Studio 2012** (earlier versions are not supported as F# projects are not backward-compatible)
* [ReSharper SDK](http://www.jetbrains.com/resharper/download/index.html) (download and install the MSI package)
* [WiX (Windows Installer for XML)](http://wix.sourceforge.net/)

If you have all of these on the machine, the solution should build out of the box. (If it doesn't, please post an issue on the tracker.)

Please note that, currently, any changes to `Tokens.xml` will need to be processed on our end - this is due to one code generation tool not making it into the SDK (please [vote for it](http://youtrack.jetbrains.com/issue/RSRP-318622)). This mechamism might be reworked at a later time.

Debugging
=========
To debug the plugin, you need to

* Have **ReSharper 7.1** installed for Visual Studio 2012
* Set `Plugin` project as StartUp project
* In the Debug section of the project properties
* Set the start action to "Start external program" and specify the path to your Visual Studio installation e.g. "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe".
* Set the command line arguments to match your debug output directory e.g. "/ReSharper.Internal /ReSharper.Plugin C:\Code\FSharper\bindebug".
* Press F5 and load a F# project

In addition, try running the `LexerVisualization` project - this gives a graphical representation of a file being lexed. You can just type things in or open an existing F# file. If you see valid code turn red - that needs to be fixed.

Contributing
============
Pull requests are most welcome and will be reviewed and integrated as soon as humanly possible. However, please don't commit one-line pull requests, as those just waste everyone's time (feel free to use `--squash` if necessary).
Right now, the bulk of development happens on the `develop` branch, though other branches will be created for various subsystems.

If you're not sure what to contribute, please take a look at the issues list.
44 changes: 22 additions & 22 deletions src/fsharper/Daemon.FSharp/src/Stages/FSharpDaemonStageBase.cs
@@ -1,22 +1,22 @@
namespace JetBrains.ReSharper.Daemon.FSharp.Stages
{
using System.Collections.Generic;
using Application.Settings;
using Psi;
using Psi.FSharp;
using Psi.Tree;

public abstract class FSharpDaemonStageBase : IDaemonStage
{
protected static bool IsSupported(IPsiSourceFile sourceFile)
{
if (sourceFile == null || !sourceFile.IsValid())
return false;
var psiFile = sourceFile.GetNonInjectedPsiFile<FSharpLanguage>();
return psiFile != null && psiFile.Language.Is<FSharpLanguage>();
}

public abstract IEnumerable<IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind);
public abstract ErrorStripeRequest NeedsErrorStripe(IPsiSourceFile sourceFile, IContextBoundSettingsStore settingsStore);
}
}
namespace JetBrains.ReSharper.Daemon.FSharp.Stages
{
using System.Collections.Generic;
using Application.Settings;
using Psi;
using Psi.FSharp;
using Psi.Tree;

public abstract class FSharpDaemonStageBase : IDaemonStage
{
protected static bool IsSupported(IPsiSourceFile sourceFile)
{
if (sourceFile == null || !sourceFile.IsValid())
return false;
var psiFile = sourceFile.GetNonInjectedPsiFile<FSharpLanguage>();
return psiFile != null && psiFile.Language.Is<FSharpLanguage>();
}

public abstract IEnumerable<IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind);
public abstract ErrorStripeRequest NeedsErrorStripe(IPsiSourceFile sourceFile, IContextBoundSettingsStore settingsStore);
}
}
40 changes: 20 additions & 20 deletions src/fsharper/LexerVisualization/MainWindow.xaml
@@ -1,20 +1,20 @@
<Window x:Class="JetBrains.ReSharper.FSharp.LexerVisualization.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Lexer Visualizer" Height="350" Width="525" x:Name="theWindow">
<Grid DataContext="{Binding ElementName=theWindow, Path=.}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Name="btnOpen" Click="OnOpen">Open</Button>
<TextBox AcceptsReturn="True" AcceptsTab="True" Grid.Row="1" Name="tbIn"
Text="{Binding Path=InputText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontFamily="Consolas">
</TextBox>
<WebBrowser Grid.Column="1" Name="theBrowser" Grid.Row="1"/>
</Grid>
</Window>
<Window x:Class="JetBrains.ReSharper.FSharp.LexerVisualization.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Lexer Visualizer" Height="350" Width="525" x:Name="theWindow">
<Grid DataContext="{Binding ElementName=theWindow, Path=.}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Name="btnOpen" Click="OnOpen">Open</Button>
<TextBox AcceptsReturn="True" AcceptsTab="True" Grid.Row="1" Name="tbIn"
Text="{Binding Path=InputText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontFamily="Consolas">
</TextBox>
<WebBrowser Grid.Column="1" Name="theBrowser" Grid.Row="1"/>
</Grid>
</Window>

0 comments on commit a4ae88d

Please sign in to comment.