Book a Demo

Author Topic: Extension points  (Read 4845 times)

ingeniero

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Extension points
« on: October 07, 2015, 08:20:54 pm »
Hi everyone,

I've created an use case  from toolbox into a diagram. This action opens my own property dialog (using the EA_OnPostNewElement method which I have redefined in my plugin).

Later if I change some properties (for example the name and description)  using my plugin (and my own property dialog), the use case is shown by EA with 'extension points label' (see image attached). This one occurs when the EA project is reloaded.

Does somebody know why this error happens?

Use case image: http://es.zimagez.com/zimage/usecase00.php
Update method: http://es.zimagez.com/zimage/usecase1.php
Update method (Object values - debug): http://es.zimagez.com/zimage/usecase2.php


Can anyone help with this?

Thanks,
Javier

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Extension points
« Reply #1 on: October 07, 2015, 09:01:41 pm »
Javier,

The best way to figure this out is to compare the data of a "good" use case with those of a "bad" use case.
Start with t_object and if those are the same check t_diagramObjects.

There must be something different that triggers the display of the extension points.

Geert

PS. Why do you use your own connection to the database? Why not simply use Repository.Execute?

ingeniero

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Extension points
« Reply #2 on: October 07, 2015, 09:32:47 pm »
Ok, I will do that

I use my own connection because queries are faster than EA Repository object.

Thanks Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Extension points
« Reply #3 on: October 07, 2015, 09:38:23 pm »
Repository.Execute is executing queries directly and you can be sure to have the right database driver. No speed loss this way.

q.

ingeniero

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Extension points
« Reply #4 on: October 07, 2015, 10:22:25 pm »
The field PDATA1 of t_object table was the problem. I was inserting a white space because by default, It doesn´t let me insert null or empty values. So the white space was the problem.

Now, I'm trying to update the component of the diagram when I modify it from my custom properties dialog by using the method

Repository.RefreshModelView(packageId)

but it crash and EA directly get closed.

Do I have to use this method, another one, I'm using it with wrong properties... Could anyone help me?

Thanks a lot.
Regards.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Extension points
« Reply #5 on: October 07, 2015, 10:29:44 pm »
Try to reload the diagram alone.
RefreshModelView will reload the whole project.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Extension points
« Reply #6 on: October 07, 2015, 11:38:45 pm »
Additionally you should report a bug since this method should not crash at all.

q.