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

Consideration for Ambiguous Glyph Prefixes #3

Open
rionmonster opened this issue Feb 2, 2016 · 1 comment
Open

Consideration for Ambiguous Glyph Prefixes #3

rionmonster opened this issue Feb 2, 2016 · 1 comment

Comments

@rionmonster
Copy link
Contributor

Firstly, I'm sure quite a bit of the community is really appreciative of this project and it is something that I have been hounded about Glyphfriend supporting for some time, so I really appreciate you taking the time to create this extension.

I recently submitted a PR for the Material Design glyph set and was about to do the same for the Entypo library as well but I noticed that this would conflict with the IcoMoon set. I encountered this same issue within Glyphfriend and eventually had to resolve it by switching up the storage mechanism to use a Dictionary<string,Dictionary<string,ImageSource>> as seen in this issue.

Basically, you would likely want to map the name of each of the directories (e.g. MaterialDesign, Bootstrap, etc.) as a key within the dictionary and then when you request a specific Glyph, you would do so within that context. I'm sure the implementation would vary within Resharper as it uses a single provider model as opposed to multiple providers (for each library).

In your case, it would probably look something like this :

private static Dictionary<string, Dictionary<string,ImageSourceIconId>> _glyphs;

internal static Dictionary<string, Dictionary<string,ImageSourceIconId>> Glyphs
{
            get { return _glyphs; }
            set { _glyphs = value; }
}

along with resolving the directory name within the LoadGlyphs() method of your GlyphfriendStorage.cs file. You could look at Glyphfriend's similar implementation of it here for some ideas as well.

@Huntk23
Copy link
Owner

Huntk23 commented Feb 3, 2016

Thank you very much for taking the time to make a PR for the Material Design glyph set and supporting this project. I will most likely push this addition out this weekend.

I did use a single provider model as a quick and temporary way to get the desired effect of your extension into ReSharper IntelliSense. I have been currently working on implementing this project the correct way according to the ReSharper DevGuide by using their ThemedIconPng MS build action from their SDK instead of the Embedded Resource. This way the Icons will also be theme/color aware and should load even faster for the ReSharper IntelliSense.

Your help and advice is beyond appreciated Rion. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants