Author Topic: New form plugin  (Read 6731 times)

Hervé

  • Hero Member
  • *****
  • Posts: 369
New form plugin
« on: November 28, 2016, 19:36:35 PM »
Hi JB, Phil,

In my day to day work, I use elements and relationships properties to store information (for servers I store cpu, memory, disc, IP address, ... information, for flow relationships I store the port and protocole, ... and so on).

When my models begin to have a certain amount of elements and relationships, it becomes difficult to follow which component has not got its properties, or if some properties are not filled in with correct value.

That's why I'm currently writing a new "form" Plugin for Archi to ease the filling-in objects properties.

At the moment, my plugin has got the following characteristics :
  • It takes as input a configuration file (JSON) that describes the forms
  • Each form can be accessed independently by a new context menu on an Archi view
  • Forms can be split in tabs[]
    • Each tab can contain graphical objects (labels, text fields, combo boxes, check boxes, tables, ...) to present the view, elements or relationships properties
    • It is possible to specify a default value, a set of valid values or even a regexp describing the correct values

    In a near future, I plan to add an export to Excel module : each tab in the form will be exported in its own Excel tab.

    Could you please create a new "org.archicontribs.form" project on GitHub ?

    Best and regards
    Hervé

Jean-Baptiste Sarrodie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 414
  • Archi Evangelist and Contributor. Visionary.
    • About me...
Re: New form plugin
« Reply #1 on: November 28, 2016, 20:06:06 PM »
Hi,

I've create the form-plugin repository.

What you describe could be used as a basis for an ArchiMate profile editor, so I might contribute ;-)

Regards,

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

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #2 on: November 28, 2016, 20:18:44 PM »
Yes, I remember the discussion we had about the profiles ... My plugin is just to wait (and because I use the properties today) ...

And, regarding your contribution, that's at you own risks and perils  ;D

Your programming skills are far beyond mines ... I do not develop very fast and my code is not conventional (that's the reason why I prefer writing plugins rather than update your code).

To summarise, my plugin is not more than an interpreter that reads a configuration file and creates the graphical objets (label, text, combo, chech box, ...) that are described. As you see, nothing really complicated except inserting an entry in the menu as I had to read a lot of document about the Eclipse framework. Wow, it's powerful but really complicated !!!

I will provide more information on the GitHub wiki.

Thanks
Hervé
« Last Edit: November 28, 2016, 22:29:53 PM by Hervé »

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #3 on: March 08, 2017, 20:33:33 PM »
Dear all,

As I now really need it at work, I spent a bit of time on my form plugin. I relased the version 0.2.0 to Github : https://github.com/archi-contribs/form-plugin

Just copy the JAR and configuration file to Archi's plugin folder and adapt the configuration file to your need. The forms can be accessed with a right click on any view.

This release ncludes :
  • A lot of bug have been corrected
  • The check button and combo boxes are now able to update properties
  • Integration of Log4J for the log file
  • A preference page have been added. At the moment, it allows to configure Log4J but some options will be added in a near future
  • Possibility to specify a filter when dynamically adding elements and relationships into a table
  • Change the Eclipse methods used to add entries in the right-clich method to be more friendly with other plugins
  • The keyworrds are now case insensitive
  • The table has now got sortable columns

More details are provided in the wiki (https://github.com/archi-contribs/form-plugin/wiki). I will complete it in the coming days.

A lot still needs to be done, especially the integration of Eclipse commands to allow undo/redo mechanism.

Best regards
Hervé

brain_work

  • Active Member
  • ***
  • Posts: 60
Re: New form plugin
« Reply #4 on: March 09, 2017, 08:55:06 AM »
Hi Hervé,

I've installed the plugin and conf file and it works. I'm planning to play a bit with it but before I'm going to do that I'm curious if you have a similar problem as I have with the search feature of Archi in combination with propertes. BTW I have this problem with the plain version of Archi 4 Beta 7 so it's not related to your plugin.

The problem is that I can't select the Properties field in the Filter options window because it's grey, see the attachement with a screen shot. Is searching on properties working okay for you?

Regards,
Peter

brain_work

  • Active Member
  • ***
  • Posts: 60
Re: New form plugin
« Reply #5 on: March 09, 2017, 09:11:46 AM »
I think I've solved my problem. I created a property + value (in two elements). That didn't solved the problem immediately. But after restarting Archi I the problem was solved and I can now search on the property I made.

Regards,
Peter

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #6 on: March 09, 2017, 10:12:24 AM »
Hi Peter,

Yes, the search function searches and list the properties in your model. If it doesn't find any, the line is greyed.

Regarding my plugin, I know I need to give more details regarding the configuration file syntax. I plan to rework the wiki page in the coming days. Meanwhile, please do not hesitate to ask me  ;)

Best regards
Hervé

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #7 on: April 16, 2017, 23:25:56 PM »
Dear all,

I'm pleased to inform you that I released a version 1.0 of my form plugin to Github : https://github.com/archi-contribs/form-plugin

This is release 1.0 as it now has got all the functionalities that I wished, including the export to Excel. I will use this Excel export functionality at work to generate the spreadsheets I today create manually ;D which is the aim of this plugin really.

I spent some time to document the plugin in the wiki https://github.com/archi-contribs/form-plugin/wiki.

Please be aware that at the moment, the plugin does not allow (yet) to undo the properties updates done through this plugin.

Best regards
Hervé

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #8 on: May 23, 2017, 23:15:26 PM »
Dear all,

I'm please to announce that I released the version 1.2 of my form plugin to GitHub : https://github.com/archi-contribs/form-plugin

The key changes are :
  • The plugin is now able to automatically download updates from GitHub (the same way my database plugin does)
  • The plugin does not update the properties on every keystroke, but when the user clicks on the OK button
  • Integration to Eclipse Commands which allows to undo / redo the properties changes made using the plugin
  • It is now possible to choose to which component the form refers to: the selected component in the view, the view itself, or the whole model
  • Change the menu icon to make it clearer
  • A lot of new capabilities  like:
  • Ability to use variables in every literal string
  • Ability to specify default values if the corresponding properties are not set
  • Ability to choose which component the form refers to (selected elements and relationships, the current view or the whole model)
  • Ability to choose what to do to properties when an empty value is entered (ignore, create if does not exist and set empty value, or delete the property)
  • Ability to decide if combo boxes are editable (the user can write a value that is not in the drop down list) or not editable (the user can only choose a value which is in the drop down list)
  • Ability to specify the font name, font size, and font style for label, text and combo controls.
  • etc ...

I'm currently updating the wiki (https://github.com/archi-contribs/form-plugin/wiki) with screenshots to provide you with more detailed information.

Best regards
Hervé

Pascal Dussart

  • Member
  • **
  • Posts: 13
Re: New form plugin
« Reply #9 on: May 24, 2017, 13:21:59 PM »

In my day to day work, I use elements and relationships properties to store information (for servers I store cpu, memory, disc, IP address, ... information, for flow relationships I store the port and protocole, ... and so on).


Hervé,

(no real question, here. Just thinking out loud)

I'm sure you've made the reflexion yourself that this sounds a lot like a CMDB.  Of course, for your particular use case the setup you describe might be "(just) good enough". (I'm trying really hard not too sound judgemental,here ;)

This made me think about an earlier mention by JB about a little project he'd been working on called OpenEAR (http://forum.archimatetool.com/index.php?topic=330.msg1769#msg1769). Hopefully we get to hear a lot more about this soon.

grts
pascal

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #10 on: May 24, 2017, 14:59:18 PM »
Hi Pascal,

Yes you'er right about the CMDB stuff. The thing is that our CMDB contains what is deployed in production, and I work on projects. So my architecture diagrams reprensent what may (or may not, depending on the project) be in the future.

In some cases, I may describe several solutions that our clients may choose between them.

In our procedure, we calculate the infrastructure cost using Excel spreadsheets, that's why my plugin is able to export to Excel  :-[

Quite a long time ago, I developped a plugin for our CMDB provider (ServiceNow). It was my first plugin and my first Java development so it is very limited. But my aim is, at the end, to be able to synchronise some views (the ones that are validated by our clients) with our CMDB.

Best regards
Hervé

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #11 on: May 26, 2017, 23:39:37 PM »
Dear all,

I'm pleased to announce the version 1.3 of my form plugin. You can find more information and download the plugin on GitHub : https://github.com/archi-contribs/form-plugin

Of people who already have got the plugin can update it automatically through its preference page.

The key update are:
  • Allow variables nesting (for instance "${property:documentation_${model:property:language}}")
  • allow to change the char used to separate variable name from its scope (for instance change "${property:language}" to "${property!language}" for people who use colons in their properties names)

I'm a bit late in the wiki update, but I uploaded a working sample configuration file that has got all the key keywords (even if they've got the default values). I hope this sample file would make life easier for people who use my plugin (I know he configuration file is quite complex)  :P

Best regards
Hervé

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #12 on: June 03, 2017, 00:13:47 AM »
Dear all,

I'm pleased to announce the version 1.4 of my Form plugin. You can find more information and download the plugin on GitHub : https://github.com/archi-contribs/form-plugin

People who already have got the plugin can update it automatically through its preference page.

The key update are:
  • It is now possible to use the form on any Archi object (and not only inside a view anymore). Therefore, it is possible to access the forms by right-clicking on the tree on the left handside of Archi.
  • The error messages have been rewritten to ease errors resolution
  • The text controls now automatically wrap their content
  • Solve bug which avoided the tooltips to show up on some controls

I know that the configuration file (JSON) is a bit complex, even when reading my wiki on Github, so one may beguins by downloading the provided sample file and go on from it. I also recommand to switch the plugin logging level to TRACE, which allows to print all the control attributes including the default values.

You are also more than welcome to frop me a line on this forum or on GitHub should you have any question, comment, or simply request new functionalities.

Best regards
Hervé

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #13 on: June 17, 2017, 22:03:19 PM »
Dear all,

I'm please to announce the version 1.5 of my form plugin. It is available on GitHub : https://github.com/archi-contribs/form-plugin

To install it, as usual you may download the .jar file anc copy it to Archi's plugins folder. Alternatively, if you already have got the form plugin installed, you may click on the "check for update" button to automatically install and install the new version.

The key updates are:
  • Finally, it is now possible to choose the configuration file(s) on the preference page
  • Online help pages have been added
  • The selected object can now be a referenced view, a canvas or a sketch view

You are also more than welcome to drop me a line on this forum or on GitHub, should you have any question, comment, or a new functionality request.

Best regards
Hervé

Hervé

  • Hero Member
  • *****
  • Posts: 369
Re: New form plugin
« Reply #14 on: August 06, 2017, 22:16:30 PM »
Dear all,

I'm please to announce the version 1.5.4 of my form plugin. It is available on GitHub : https://github.com/archi-contribs/form-plugin

To install it, as usual you may download the .jar file and copy it to Archi's plugins folder. Alternatively, if you already have got the form plugin installed, you may click on the "check for update" button to automatically install and install the new version.

The key updates are:
  • Updating a control updates in real time all the other controls that refer to the same variable
  • Add "in" test in filter
  • Add "${source:xxx}" and "${target:xxx}" variables scope when selected object is a relationship
  • Bugs correction on the export to Excel part
  • Add "delete" excelDefault behaviour
  • Add "foreground" and "background" keywords for table columns
  • Labels are now in wrap mode

You are also more than welcome to drop me a line on this forum or on GitHub, should you have any question, comment, or a new functionality request.

Best regards
Hervé