Bug 380266 - Import / export unstable - limiting
Summary: Import / export unstable - limiting
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.21.3 (KDE Applications 16.12.3)
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
: 150805 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-28 08:06 UTC by Hamidreza Jafari
Modified: 2018-08-23 08:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.22.80 (KDE Applications 17.07.80)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hamidreza Jafari 2017-05-28 08:06:14 UTC
Hello,

It is important to enable some level of integration. It is way easier, quicker and less error prone to import model and diagram data via simple structured text such as csv and also to extract such data the same. currently a user has to point and click many times to define a single attribute. Also export functionality is buggy, does not create html.
Comment 1 Hamidreza Jafari 2017-05-28 12:25:18 UTC
For others encountering similar problem and also as presenting a way to implement future import / export feature, here is a suggestion:

If the purpose is to gather and organize info (for a later data model) then use freeplane mind mapping application. Define entities as many as required in a simple text file each line for an entity name or attribute. Use tab indentation (as many levels) as required to denote hierarchy. Then select all/copy and paste into a node in freeplane. The opposite also works fine. Here is a sample:

Designer
    ID
    Name
    Skills
Developer
   ID
   Name
   Passion
...

Finally export HTML from freeplane!

The benefit is you have a structured document to easily observe and manipulate with a quite working tool as you move forward.
Comment 2 Ralf Habacker 2017-05-29 11:59:56 UTC
(In reply to Hamidreza Jafari from comment #0)
> It is important to enable some level of integration. It is way easier,
> quicker and less error prone to import model and diagram data via simple
> structured text such as csv

With version 2.21.80 a feature of importing sequences into a sequence diagram from file or clipboard has been added (see bug 374845 for more details)
Comment 3 Hamidreza Jafari 2017-05-30 06:36:35 UTC
Good for sequence diagrams. Data Model is a more important aspect of software production. Similar implementation should make that feature available for other diagrams but with priority if developers are limited.
Comment 4 Ralf Habacker 2017-05-30 09:56:20 UTC
(In reply to Hamidreza Jafari from comment #1)
> Define entities as many as required in a simple text file
> each line for an entity name or attribute. Use tab
> indentation (as many levels) as required to denote hierarchy. 
... 
> Designer
>     ID
>     Name
>     Skills
> Developer
>    ID
>    Name
>    Passion
> ...

I guess with 'Designer' you are refering to a class and 'ID' relates to be a class member ?  

Assuming such a construct would be importable into an umbrello class diagram: How would you specify class methods, namespaces, generalization, associations, class visibility and other available attributes ?
Comment 5 Hamidreza Jafari 2017-05-30 10:03:21 UTC
I just mentioned a minimum to set direction - class names and attributes. Could use some keywords, mnemonics or symbols specifying attributes, methods, visibility  etc. Take () for denoting methods at the end of identifiers.
Comment 6 Ralf Habacker 2017-05-31 16:40:55 UTC
Git commit 96ad2a5ea6e85a88905c9e0b807ac867e86255a1 by Ralf Habacker.
Committed on 31/05/2017 at 16:40.
Pushed by habacker into branch 'master'.

Add support for importing simple statements into class diagrams.

Class and association statements could be imported by pasting from
the clipboard or by selecting "from file" in the "new" submenu of
a class diagram context menu.

Parsing errors occured on import are logged into the log window.

See test/import/diagrams/class/examples.txt for examples of
supported statements.
FIXED-IN:2.22.80 (KDE Applications 17.07.80)

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>

A  +64   -0    test/import/diagrams/class/examples.txt
R  +0    -0    test/import/diagrams/sequence/stacktrace-gdb.txt [from: test/import/stacktrace/stacktrace-gdb.txt - 100% similarity]
R  +0    -0    test/import/diagrams/sequence/stacktrace-qtcreator.txt [from: test/import/stacktrace/stacktrace-qtcreator.txt - 100% similarity]
M  +3    -1    umbrello/basictypes.cpp
M  +3    -2    umbrello/basictypes.h
M  +2    -3    umbrello/clipboard/umlclipboard.cpp
M  +2    -1    umbrello/codeimport/import_utils.cpp
M  +1    -1    umbrello/codeimport/import_utils.h
M  +180  -15   umbrello/diagram_utils.cpp
M  +6    -4    umbrello/diagram_utils.h
M  +2    -1    umbrello/listpopupmenu.cpp
M  +2    -2    umbrello/umlscene.cpp

https://commits.kde.org/umbrello/96ad2a5ea6e85a88905c9e0b807ac867e86255a1
Comment 7 Hamidreza Jafari 2017-06-01 10:48:53 UTC
Great. Have to wait for the package or find some time to install the patch.
Comment 8 Ralf Habacker 2017-06-19 09:14:31 UTC
Git commit d6da482b1859727fcddf2a0c62a6a0bda8444385 by Ralf Habacker.
Committed on 19/06/2017 at 09:01.
Pushed by habacker into branch 'master'.

Add support for importing simple statements into class diagrams.

Class and association statements could be imported by pasting from
the clipboard or by selecting "from file" in the "new" submenu of
a class diagram context menu.

Parsing errors are logged into the log windows.

See test/import/diagrams/class/classes.txt for the supported statements.
FIXED-IN:2.22.80 (KDE Applications 17.07.80)

A  +64   -0    test/import/diagrams/class/classes.txt

https://commits.kde.org/umbrello/d6da482b1859727fcddf2a0c62a6a0bda8444385
Comment 9 Ralf Habacker 2018-05-23 12:43:59 UTC
*** Bug 150805 has been marked as a duplicate of this bug. ***
Comment 10 Hamidreza Jafari 2018-08-14 13:23:52 UTC
This doesn't work in 2.22.3. I have updated regularly and it seems Umbrello's package did not mirror the latest development.

Clipboard pasting from the mentioned examples triggers an error message and there is no such from file submenu in a class diagram context menu.
Comment 11 Ralf Habacker 2018-08-14 14:28:07 UTC
Comment 8 says that this was added to version 2.22.80, which later became stable version 2.23.0.

Version 2.22.3 was released before and therefore does not include this feature.
Comment 12 Hamidreza Jafari 2018-08-15 19:13:01 UTC
I mentioned that I do regular updates. Why Umbrello is stuck at 2.22.3?
Comment 13 Ralf Habacker 2018-08-22 11:55:36 UTC
You need to ask the maintainers of the distribution, where you got version 2.22.3.

A simple google search for "umbrello ubuntu" returns https://packages.ubuntu.com/search?lang=de&suite=cosmic&searchon=names&keywords=umbrello
Comment 14 Ralf Habacker 2018-08-23 08:25:11 UTC
Just for the record: binary packages for 2.23.0 may be named as 17.08.0. So you need to install a package newer or equal to that version.