archi-contribs / specialization-plugin

Plugin for Archi to specialize concepts (figure, icon...)
Other
29 stars 2 forks source link

Make image folder and property name customizable #3

Closed jbsarrodie closed 6 years ago

jbsarrodie commented 6 years ago

Hi,

I've started to experiment with this plugin and I have a use case where I'd like to use another property name. The reason is that for several models I use a property named "Stereotype" which value is the type of customized element. Being able to defined that this property drives the choice of the image would be great and a first step in Archi supporting ArchiMate language customization mecanisms. In addition, the location of the image folder should be customizable too as not all users have write access to the Archi setup folder.

That being said: Great work !

Regards,

herve91 commented 6 years ago

Hi JB,

Fair enough, I will add an option to change the property name.

Regarding the images location, I failed to put it outside the "img" folder of the editor plugin because I did not rewrite the whole icon process, but only change the icon name calculated by the editor plugin. But I will try harder :)

If you've got some idea on how to do it, please feel free to drop me a line :)

jbsarrodie commented 6 years ago

Fair enough, I will add an option to change the property name.

Great!

If you've got some idea on how to do it, please feel free to drop me a line :)

I'll look at your code to help you on that (we did it for the model-repository-plugin)

herve91 commented 6 years ago

Hi JB,

Sorry it took so long. The new 0.3 version allows to change the property name on a view by view basis "replace icons property" and "replace labels property").

Please do not hesitate to tell me if this does not suit your needs.

Best regards Hervé

jbsarrodie commented 6 years ago

Hi Hervé,

Thank you for the update. I'll have to test it.

The new 0.3 version allows to change the property name on a view by view basis

Do we also have a way to globally set it (e.g. in my case it will always be "Stereotype" so I don't want to have to add a property on each and every views...

herve91 commented 6 years ago

I did not think about it, but can easily do it.

I can even extend it to something like:

  1. check for the existence of the "replace icon property" on the element itself
  2. if it does not exist, check the existence of the "replace icons property" on the view
  3. if it does not exist, check the existence of the "replace icons property" on the model

Would it suit your need ?

jbsarrodie commented 6 years ago

Would it suit your need ?

Short answer: yes ;-)

herve91 commented 6 years ago

Ok, so I'll do it :-)

herve91 commented 6 years ago

Hi JB,

It's done. It will be in the next release.

Best regards Hervé

herve91 commented 6 years ago

I just released the version 1.0 of my plugin.

Please do not hesitate to open a new issue if this does not work as expected.