database plugin v2.0.0

Started by Hervé, April 28, 2017, 22:32:29 PM

Previous topic - Next topic

Hervé

Dear Marc,

Thanks for your interest in considering my plugin.

My plugin is working as an export/import plugin. It does not allow to drag and drop components from one model to another one. But it allows to import a component that has been created in one model, into another one.

Here is an example on how to share an element from one model to another:
   1 - in the model 1, create the element or the view you wish to share
   2 - export your model 1 in the database

   3 - in the model 2, right click on a folder or a view and select "import individual component"
   4 - an import window will popup
             ¤ in the "Filter" box, you need to click on the diagram of the element you wish to import (or click on "Views" to import a view)
             ¤ you may also filter on the component's name in the "Name filter" input field
             ¤ the elements (or the views) are then listed in the bottom box
             ¤ you may select the component you wish to import and then click on "import", or alternatively, you may double click on the component
   5 - the component is then imported in your model 2 (for elements, if you right clicked on a view, then a graphical object will automatically be created for them in the view)

Doing this way, you've got 2 import ways :
   1 - copy: this mode is quite straight forward. When you import elements or views, the internal ID is changed to a new one. In the database, they are completely different objects that may have completely distinct values.
   2 - shared: In this mode, these elements and views have got the same ID. When exporting to and importing from the database, the plugin will refer to the same database objects. When you update such element or view in any model, the updates will be automatically seen in other models.

Regarding the shared mode, please be aware of the following limitation: the plugin is only an export/import plugin. This implies:
  1 - the updates done on shared elements or views in one model are not seen real time in other models
  2 - they need to be exported in the database before beeing seen by others models

I hope these explanations answers your question. Please do not hesitate to drop me a line should you need more explanation.

Best regards
Hervé
         

MarcF88

Ah, Hervé, thank you for your swift response! I think I understand, I will try and let you know. However currently I seem to be plagued by some issues with the plugin in my current setup; it cannot start after I close and re-open Archi. The stack trace is something like

!SESSION 2017-08-08 17:20:29.222 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_131
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=nl_NL
Command-line arguments:  -os win32 -ws win32 -arch x86 -clean

!ENTRY org.eclipse.ui 4 0 2017-08-08 17:21:18.029
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: org.archicontribs.database.GUI.DBGui
   at org.archicontribs.database.DBImporter.doImport(DBImporter.java:40)
   at org.archicontribs.database.DBImporter.doImport(DBImporter.java:29)
   at com.archimatetool.editor.actions.ImportModelAction.run(ImportModelAction.java:40)
   at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
   at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
   at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)

(and so on).

I can submit an issue on github for this, ok?

Regards,
Marc