midora Posted July 25, 2014 Share Posted July 25, 2014 Especially on the new external PluginBrowser Effect Plugin and the PluginSupportInfo used by this effect and by Paint.NET 4 to show the menu tooltips. 1) PluginBrowser should not use AssemblyConfiguration to look for keywords. AssemblyConfiguration is used typically to distinguish between "Debug" and "Release" configurations. If the keywords should be stored in the assembly then I would prefer to define a new attribute: AssemblyKeywordsAttribute.cs: namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] public sealed class AssemblyKeywordsAttribute : Attribute { public string Keywords { get; private set; } public AssemblyKeywordsAttribute() : this(string.Empty) { } public AssemblyKeywordsAttribute(string keywords) { Keywords = keywords; } } } This allows you to use the attribute in AssemblyInfo.cs [assembly: AssemblyKeywords("One; Two; Three; Eins; Zwei; Drei")] I'm using AssemblyCompanyHomeAttribute to store the URI in the assembly for a long time now w/o any issue. 2) Allow semicolon as separator instead of comma. 3) There are two other issues which can be solved only by using/extending PluginSupportInfo (IMHO). First is about multiple effects in one assembly and second is about multiple languages support. A simple solution may be to add a Keywords property to PluginSupportInfo as soon as possible. Already now developers can bind an individual PluginSupportInfo to an effect class. This interface may deliver language specific keywords. Or a method may be provided to get all keywords or only the keywords for a specific language. 4) For the future a mechanism which allows Paint.NEt to check for updates of installed plugins would be fine. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 25, 2014 Share Posted July 25, 2014 I agree the using AssemblyConfiguration is the wrong attribute to use for keywords. As for adding anything to PluginSupportInfo "as soon as possible," it'll have to wait until September at least. There won't be any updates until then. I'm goin' on break.</mitch hedberg> Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
BoltBait Posted July 25, 2014 Share Posted July 25, 2014 Yes. When the Dwarf Horde approached me about plugin browser, I just did a quick look around and decided to use AssemblyConfiguration for the list of keywords. I knew that it wasn't the intended purpose for the field. But, I also knew that CodeLab always produces Release builds. AND, it was the option that caused me to write the least amount of code. We can always change it. I'm not opposed to that. In fact, I'd like to change it to something that is more flexible than AssemblyConfiguration. As we're doing it now, every effect in the same dll must have the same set of keywords and description. Only the display name can be changed. I'd like to fix that. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 26, 2014 Share Posted July 26, 2014 We didn't 'approach' you - we sneaked up from behind and press-ganged you Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.