Author Topic: Archi 4.6 features  (Read 373 times)

Hervé

  • Hero Member
  • *****
  • Posts: 487
Archi 4.6 features
« on: November 25, 2019, 00:12:38 AM »
Hi,

I'm close to release a new version of my database plugin that complies with Archi 4.6.

I was wondering why the new objects properties have been done differently than the legacy one. For instance, alpha property is an integer value in the IDiagramModelObject whereas the lineAlpha property is a feature, same for the "show name" property for the connections.

Do you plan to instantiate all the new properties to features ?
Do you plan to move existing properties to features ?

Thanks and regards
Hervé

Jean-Baptiste Sarrodie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 612
  • Archi Evangelist and Contributor. Visionary.
    • About me...
Re: Archi 4.6 features
« Reply #1 on: November 25, 2019, 06:26:50 AM »
Hi Herve,

In short, yes we plan to move existing attributes to features.

The reason is because with features there is no need to change internal ECore and serialization format.

This also allows any plugin to store information (for example, this means that Specialization plugin can use feature instead of properties for label).

Regards,

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

Hervé

  • Hero Member
  • *****
  • Posts: 487
Re: Archi 4.6 features
« Reply #2 on: November 25, 2019, 07:51:09 AM »
Hi JB,

Thanks a lot.

I'll try to follow the updates in your code in order to deliver compatible plugins quicker :-)

Thanks and regards
Hervé

Hervé

  • Hero Member
  • *****
  • Posts: 487
Re: Archi 4.6 features
« Reply #3 on: November 25, 2019, 18:14:10 PM »
I've got a little doubt ...

getProperties() on graphical objects and connections gives the properties of the corresponding element or relationship.

Is it the same behaviour for getFeatures() or do they have their own features ?

Thanks

Jean-Baptiste Sarrodie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 612
  • Archi Evangelist and Contributor. Visionary.
    • About me...
Re: Archi 4.6 features
« Reply #4 on: November 25, 2019, 19:27:56 PM »
Hi,

I've got a little doubt ...

getProperties() on graphical objects and connections gives the properties of the corresponding element or relationship.

Is it the same behaviour for getFeatures() or do they have their own features ?

Thanks

Graphical objects have their own Features (needed to store visual attributes).

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

Hervé

  • Hero Member
  • *****
  • Posts: 487
Re: Archi 4.6 features
« Reply #5 on: November 25, 2019, 20:43:51 PM »
Perfect.

Thanks a lot
Hervé

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1467
  • Archi Guy
    • Archi
Re: Archi 4.6 features
« Reply #6 on: November 26, 2019, 16:42:36 PM »
Objects that implement IFeatures:

- IArchimateConcept (IArchimateElement and IArchimateRelationship)
- IArchimateModel
- IDiagramModel
- IDiagramModelComponent
- IFolder

Which is pretty much everything.

An issue with using IFeatures and an IFeaturesEList is that it's up to the developer to do good housekeeping and use unique key names. Probably best to use key names like "com.herve.whatever.myFeature". And also remove features that are not used. If you set a feature to its default value it won't be saved. Take a look at IFeaturesEList code.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

Hervé

  • Hero Member
  • *****
  • Posts: 487
Re: Archi 4.6 features
« Reply #7 on: November 26, 2019, 18:25:06 PM »
Thanks  ;D