Skip to content

Annotate attribute members with resource completion hint #2862

@kzu

Description

@kzu

As part of an exploration on how to improve the productivity of our code editing experience, we investigated improved code completion powered by Roslyn that could make it easier to use the myriad attributes where strings are intended to point to resource identifiers for various scenarios (i.e. ActivityAttribute)

The intended user experience would look like the following:

CompletionFromResource

In order to make the completion smart about what the various string values mean, I propose annotating the attribute properties with the existing [System.ComponentModel.Category("CATEGORY")] attribute that the IDE can then use to filter the offered values. To drive the above completion for the Activity.Label property, for example, we would annotate it with:

[Category("@string")]
public string Label {get; set;}

Any other attributes that point to any of the generated resource identifiers in Resource.designer.cs are potential candidates for being annotated this way too.

The associated user story on the IDE side is at https://devdiv.visualstudio.com/DevDiv/_workitems/edit/724024

Metadata

Metadata

Assignees

Labels

Area: App RuntimeIssues in `libmonodroid.so`.enhancementProposed change to current functionality.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions