Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata missing for Intellisense for constructor parameters #4738

Open
jamesmontemagno opened this issue Dec 14, 2018 · 10 comments

Comments

@jamesmontemagno
Copy link
Contributor

commented Dec 14, 2018

Description

IntelliSense either doesn't show or gives squiggles for the following:

  • ListView -> CachingStrategy
  • Android Platform Specifics: TabbedPage.ToolbarPlacement, BarItemColor, BarSelectedItemColor, VisualElement, ImageButton, Application, NavigationPage, anything in AppCompat specifics

Also there are a bunch of iOS ones that don't show up as well:

  • Entry.CursorColor

I am also seeing that on Android any of the "Application" ones are missing too.

There may be more.

Steps to Reproduce

  1. In VS 2017 try to set these... they don't come up in intellisense and some give squiggles.

Expected Behavior

They show up

Actual Behavior

They don't :(

Basic Information

  • Version with issue: All, tested with 3.1-3.4
  • Last known good version: None
  • IDE: VS 2017

Screenshots

image

Reproduction Link

@hartez

This comment has been minimized.

Copy link
Member

commented Dec 14, 2018

I'm seeing squiggles for ToolbarPlacement, but Intellisense for the values seems fine:

2018-12-14_14-08-04

@jamesmontemagno

This comment has been minimized.

Copy link
Contributor Author

commented Dec 14, 2018

I think for that one it does come up, but if you just type:

android:TabbedPage.

it does not.

Also on ListView CachingStrategy never comes up

@hartez

This comment has been minimized.

Copy link
Member

commented Dec 14, 2018

I actually don't get squiggles for the properties with value types (IsSwipePagingEnabled, IsSmoothScrollEnabled, OffscreenPageLimit). But the properties whose types are defined in Forms (ToolbarPlacement, BarSelectedItemColor, BarItemColor) I'm seeing squiggles.

@hartez

This comment has been minimized.

Copy link
Member

commented Dec 14, 2018

I think for that one it does come up, but if you just type:

android:TabbedPage.

it does not.

I'm getting full-on Intellisense for that stuff. Something is definitely (and inconsistently) broken.

2018-12-14_14-18-50

@hartez hartez added the e/5 🕔 label Dec 14, 2018

@hartez hartez added this to To do in Other Ready For Work via automation Dec 14, 2018

@hartez hartez removed this from New in Triage Dec 14, 2018

@jamesmontemagno

This comment has been minimized.

Copy link
Contributor Author

commented Dec 15, 2018

@hartez do you have some extension installed? I am on 15.9.4 and Xamarin.Forms 3.4.X

nointellisense

@jamesmontemagno

This comment has been minimized.

Copy link
Contributor Author

commented Dec 22, 2018

I am also seeing that on Android any of the "Application" ones are missing too.

@samhouts samhouts added this to In Progress in v3.5.0 Dec 26, 2018

@samhouts samhouts moved this from In Progress to Done in v3.5.0 Dec 27, 2018

@jamesmontemagno

This comment has been minimized.

Copy link
Contributor Author

commented Feb 12, 2019

Any update on the Tabs stuff? I think we got some of them done?

@samhouts samhouts moved this from Done to Ready in v3.5.0 Feb 14, 2019

@StephaneDelcroix

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

@hartez

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

My bad, I thought I'd added these notes a while ago. Anyway ...

For the Platform Specifics which don't show up in Intellisense (and get squiggles):

The problem is that some of them (the ones that don't work) have overloads, and it confuses Intellisense.

So IsSmoothScrollEnabled works because the two methods are:

public static bool GetIsSmoothScrollEnabled(BindableObject element);

and

public static bool IsSmoothScrollEnabled(this IPlatformElementConfiguration<Android, Forms.TabbedPage> config);

The attached property Intellisense follows the pattern for the getter (Get[PropertyName]) and finds the first method. No problem.

The ones that don't work look like this:

public static Color GetBarSelectedItemColor(this IPlatformElementConfiguration<Android, Forms.TabbedPage> config);

and

public static Color GetBarSelectedItemColor(BindableObject element);

It follows the name pattern, but there are two matching methods. So it gives up/gets confused and decides it can't find the "property" on that type.

So one fix that works (I've tested this) - just rename the extension methods (the ones with this IPlatformElementConfiguration) so they don't conflict. But they're public methods, so we can't just rename them.

I think we could work around this by creating new methods, obsoleting the old ones, and marking the old ones with EditorBrowsable.Never;

If not, maybe there's some other kind of attribute we can decorate the correct methods with so that Intellisense can find them.

@mgoertz-msft

This comment has been minimized.

Copy link

commented Feb 21, 2019

The dark themed screenshots look like the IntelliSense is coming from Resharper - ours doesn't actually have help tooltips for completion items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
5 participants
You can’t perform that action at this time.