Comments (3)
I have figured it out.
Inside this file declarationInfo.ts the method getProperties
uses a RegExp
to split the property line definition by fields. This RegExp doesn't matches two common scenarios:
a. public virtual Person _Person
b. public int? Size
Since the item.type
and item.name
are initialized to results[1]
and results[2]
respectively, the scenario a makes to match Virtual
as type and Person
as name.
For the scenario b is different: the ?
is a special char so the regexp doesn't match at all.
The fix is easy:
we could replace this line:
let propRegExp = /public\s(\w*<?\w+>?)\s(\w+)/g;
to
let propRegExp = /public\s(?:virtual\s)?(\w*<?\w+>?\??)\s(\w+)/g;
here we can test the regexp: newRegExp
For the scenario b the new regExp works great because it shows the ?
as well, which notify the developer that this field is <Nullable>
I'm really sorry to not be able to make this change by myself. I tried to clone the project and run it in debug mode, but I'm not able to achieve this.
I'm so sorry.
p.s. If someone can help me to get it done I will appreciate. I really love this plugin, I think it's a shame for Microsoft to not fully support Razors and tag-helpers with visual studio code. I have a lot of problem formatting razor file as well.
from aspnet-helper.
Finally, I made a pull request #12
I hope this will be merged.
from aspnet-helper.
Hey :)
I merged the pull request.
from aspnet-helper.
Related Issues (17)
- Anchor helper not working if project root is not vs code workspace root
- Can't seem to get the extension to work (vscode on Debian 8.6) HOT 4
- VS Code 1.9.1 on MacOSX HOT 1
- Errors are displayed while using the extension HOT 26
- cpu lockup on ubuntu HOT 1
- Intellisense HOT 8
- High CPU usage - macOS HOT 1
- Model from different namespace than view HOT 2
- It does not autocomplete inherited models HOT 1
- Intellisense for Model's in cshtml files not working. HOT 6
- Intelligence not working in View
- False error reports in view + intellisense not working HOT 4
- Kentico and Umbraco CMS
- Extension causes high cpu load
- goahead
- Usage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnet-helper.