How does type completion intellisense work in config files?

According to the ReSharper blog (http://resharper.blogspot.com/2007/06/resharper-curious-facts-ancient-request.html) and the JIRA tracker (http://jetbrains.net/jira/browse/RSRP-2235), ReSharper 3.0 supports type completion for app.config files.

In app.config files it is common to use full type names, assembly names and such. Having limited intellisense support would be handy. This applies also to aspx pages.

Take the following app.config file:

  
     
  
]]>


This feature arrived in build 429 (I am currently using EAP build 465). If I place the cursor inside the type attribute's quotes, pressing CtrlSpace, CtrlShiftSpace or CtrlAlt+Space all yield nothing.

How do I get type completion for the type attribute of the section element?

8 comments
Comment actions Permalink

James,

The feature does not work in web.config file. In other file it should work
as follows:
1) type in one or more characters of the type name you are expecting to
complete in either tag attribute or in tag body where text is expected

2) press CtrlAltSpace (or whatever shortcut is assigned to
ReSharper.Resharper_CompleteCodeTypeName command)
the suggestion list is to appear.

PS Note, type name completion does not work if no characters typed in.
PPS It should work if you place cursor within some text instead of typing
in.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

The feature does not work in web.config file. In
other file it should work as follows:


I was not using a web.config file. I had a simple console appliation with an app.config file. Are you saying it does not work in any .net config files? The JIRA task that was closed is specifically for app.config files. JIRA title: Give limited intellisense in app.config.

The task also refers to aspx pages and reflection. Are either of these use cases supported?

If the described feature has not been implemented for configuration files then please either reopen the task or create a new task for that feature.

You mention that this feature should work for "other file" types. What types are these that it did not previously work for?

0
Comment actions Permalink

Nudge. Anyone care to comment on this?

RSRP-2235 still not implemented (as stated in the JIRA issue and commented by me above) in build 506

0
Comment actions Permalink

James,

It's closed according to JIRA. Moreover, I've just checked it - type name
completion works as described above.
Could you send me the solution, that illustrates the problems you are
experiencing.

BTW what build are you using?

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

I have attached a simple solution demonstrating the problem. The single project is a console app with an app.config file.

Open the app.config file and place the cursor at the end of the NoType text in the section element. Pressing CtrlAltSpace (ReSharper.Resharper_CompleteCodeTypeName) does nothing at all (for me).

I am currently using build 3.0.506.8



Attachment(s):
NoTypeCompletionInAppConfig.ConsoleApplication.zip
0
Comment actions Permalink

James,

No list is shown because there is no type in solution with name starting
with "notype" (maybe, it's a good idea to show empty list with a 'no
suggesstion' label). But if you place caret after "no" and press
ctrlaltspace, you'll see plenty of types suggested.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

That was my misunderstanding. There is a namespace starting with "notype" and I obviously got a little confused. Thanks.

I still have the problem in my main solution and I will check again.

0
Comment actions Permalink

Ok, here are my latest findings on type completion in an app.config file, using the previously attached example.

1. I changed the Program class from (implicit) internal to public visibility.

If I try type name completion in app.config with a prefix token of one or two characters (E.G. P or Pr), R# always generates an exception (http://www.jetbrains.net/jira/browse/RSRP-48308). With more than two characters, R# may generate an exception (E.G. I just loaded a fresh VS 2005, typed Progra into the app.config attribute, pressed CtrlAltSpace and got the same exception as references above).

After this exception, type name matching in the app.config becomes unstable. It may match or it may generate further exceptions.


R# 3.0.2 C# edition (build 517.8), VS2005 SP1 Pro, Win XP Pro



Attachment(s):
NoTypeCompletionInAppConfig.ConsoleApplication.2.zip
0

Please sign in to leave a comment.