lukebuehler / nrefactory-completion-sample Goto Github PK
View Code? Open in Web Editor NEWA small but full featured prototype how to do code completion with NRefactory
A small but full featured prototype how to do code completion with NRefactory
When initializing a variable with Type using fully qualified type name (and the using statement is not mentioned), code completion suggests improper type.
For example, opening the sample and typing the following line -
System.Net.WebClient wc = new
on say 11th line will trigger completion window that has the item 'WebClient' as Completion text which should be completed as 'System.Net.WebClient' instead.
You state that:
The project is structured so that the code completion part could be used directly as a library.
Yet the ICSharpCode.CodeCompletion project heavily relies on AvalonEdit and therefore WPF.
There should be no references to these if this was the case, and the code completion etc should be functions like:
GetIntellisenceItemsFromPosition(...
etc
There should be another project that links the code completion to the AvalonEdit control.
Kris
Wrong caret position after moving the cursor to the next line in brackets, see video example here: http://db.tt/37NNTkEk
I have fixed this bug by adding CSharpFormattingStrategy to AvalonEdit project.
You can download my code here: http://db.tt/0jGlNG9B
I'm guessing the "ScriptProvider" in "ICSharpCode.CodeCompletion.Sample" is supposed to allow the addition of assemblies however I can't seem to get this to work. Is this something anyone else has problems with or is it just me?
GetVars() Method in ScriptProvider is never used !
Please how to make your solution work on a textblock without using the Sample.cs files. I would like to use it on WF (Windows workflow fondation) project.
As title i can not add using System.Data
Hi Luke,
In OverrideCompletionData.cs
you use var syntaxTree = new CSharpParser().Parse(document);
(as one of a handful of examples) where document
here is of type ICSharpCode.AvalonEdit.Document.TextDocument
. The Parse(...)
method expects a type of ICSharpCode.NRefactory.Editor.ITextSource
and it is getting ICSharpCode.AvalonEdit.Document.ITextSource
. So I am getting a compiler fail, but in your solution you do not. My question is what am I missing here?
Thanks for your time.
I was wondering if you would be willing to re-license your completion sample under MIT to match SD's license change.
The project does not compile. Here is such an error:
Error CS0006 The metadata file "C: \ Users \ Admin \ Downloads \ NRefactory-Completion-Sample-master \ NRefactory-Completion-Sample-master \ Bin \ ICSharpCode.CodeCompletion.dll" could not be found.
ICSharpCode.CodeCompletion.Sample C: \ Users \ Admin \ Downloads \ NRefactory-Completion-Sample-master \ NRefactory-Completion-Sample-master \ Src \ ICSharpCode.CodeCompletion.Sample \ CSC 1 Active
The following files have comments indicating they are GPL:
CodeCompletionResult.cs
CSharpCompletionContext.cs
The following files have comments indicating both GPL and LGPL:
CodeCompletionDataFactory.cs
CSharpInsightItem.cs
CSharpOverloadProvider.cs
SegmentTrackingOutputFormatter.cs
Any chance you'd be willing to re-license these as MIT or similar, or at least LGPL for the top two?
Either way, thanks for this sample.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.