File icons are typically not placed directly in icons/, but in the icons/fileTypes/ directory.
The new Dart icon files don't follow this standard, yet the path in the icon_associations.xml file assumes that they do and is also missing a leading slash
I'll put up a pull request in a few minutes.
Do you happen to know why the patterns include .*? It seems to be partial match, not full match, according to the $s.
Are you referring to the $ character at the end of the pattern? If so, I don't see why that would imply partial matching. It might be redundant for a full match, but when has redundancy ever stopped programmers? :D
I just tested it without the "0 or more of any character"-part of the pattern and it does not successfully match somefile.dart anymore.
I have absolutely no experience with Java so take the following with a grain of salt but the syntax is hardly exotic so here's what I could glean from the plugins' source:
The matches method of the RegexAssociation class compiles the given regex into a pattern, constructs a matcher from it and finally matches "[...] _the entire region against the pattern_"
See the java.util.regex.Pattern docs for more info.
The typical invocation example is pretty close to what's being done here.
Oh yes, I can tell from this line that it is using java.util.regex.Matcher#matches(), so what you said is probably the case (I happen to have a little experience with Java). Then the conclusion is that the trailing dollar sign is redundant. Also note that Lua rule doesn't have the trailing dollar sign.
Any update on this? I'm still getting an error: Icon cannot be found in 'icons/fileTypes/dart.png', aClass='class com.chrisrm.idea.icons.MTFileIconProvider'
Even with the latest update to work with Webstorm 2017.1
The pull request with the fix has been available for two months but contributor activity has only recently picked up again. It was probably overlooked as those not using Dart won't ever run into this issue.
Mentioning @denofevil so that he can maybe take a quick look and merge #301 ?
@AnTiZ thank you, I've merged this one
Appreciated.
Thanks for looking after this project.
Great, now how do I make Webstorm aware of this merged PR?
@smrtsmrf, I'm going to check other pending PRs and release an update after that.
I'll free up some time this week to work on this project. Hopefully I'll manage to shorten the issues-list quite a bit. Thanks for the PR @AnTiZ 馃憤
Most helpful comment
@smrtsmrf, I'm going to check other pending PRs and release an update after that.