Bug 386479 - Imported classes are not placeable on diagrams after java import
Summary: Imported classes are not placeable on diagrams after java import
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: importer (show other bugs)
Version: 2.22.2 (KDE Applications 17.04.2)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on: 386698
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-02 20:28 UTC by Ralf Habacker
Modified: 2018-01-04 02:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.24.1 (KDE Applications 17.12.1)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2017-11-02 20:28:04 UTC
Nolaan reported on the umbrello mailing list:
> When trying to generate UML diagrams from https://github.com/bisq-network/
> exchange/tree/master/network/src/main/java/io/bisq/network
> I have an issue where the result are totally messed up, many occurrences of 
> the same class and impossible to put them on a class diagram.

How to reproduce:
1. clone mentioned git repo
2. start umbrello
3. select java language
4. import mentioned path

What happens ?
There are several io/bisq/network namespace entries in the tree view and classes below this namespaces could not be placed on a class diagram

That is expected ?
There should only be one namespace entry named io/bisq/network and the classes below should be placeable on diagrams
Comment 1 Ralf Habacker 2017-11-07 21:06:15 UTC
Git commit edd187d85cbd92c42a6e4a0ad0a841b2599abfa3 by Ralf Habacker.
Committed on 07/11/2017 at 21:05.
Pushed by habacker into branch 'master'.

Add basic java import test cases
Related: bug 386624

A  +9    -0    test/import/java/HelloWorld.java
A  +11   -0    test/import/java/apackage/AbstractClass.java
A  +11   -0    test/import/java/apackage/Base.java
A  +27   -0    test/import/java/apackage/Derived.java
A  +6    -0    test/import/java/apackage/Enum.java
A  +11   -0    test/import/java/apackage/Generic.java
A  +5    -0    test/import/java/apackage/Interface.java
A  +5    -0    test/import/java/apackage/Type.java
A  +12   -0    test/import/java/apackage/UseGeneric.java

https://commits.kde.org/umbrello/edd187d85cbd92c42a6e4a0ad0a841b2599abfa3
Comment 2 Ralf Habacker 2017-11-11 16:52:24 UTC
Git commit 2ce0c6d8fc96014dde6476a02fe10eecb38fa579 by Ralf Habacker.
Committed on 11/11/2017 at 16:51.
Pushed by habacker into branch 'master'.

Fix endless loop in java import

The endless loop happens on importing

https://github.com/bisq-network/exchange/tree/master/network/src/main/java/io/bisq/network

M  +5    -0    umbrello/codeimport/javaimport.cpp

https://commits.kde.org/umbrello/2ce0c6d8fc96014dde6476a02fe10eecb38fa579
Comment 3 Ralf Habacker 2017-11-13 00:14:33 UTC
The issues happens inside the namespace hierachy io.bisq.network.p2p.network and is triggered by having the same part more then one time in the namespace, which is here 'network'. 

Renaming the namespace to io.bisq.network.p2p.Network before importing is a workaround until this bug has been fixed.
Comment 4 Ralf Habacker 2018-01-04 02:46:08 UTC
Git commit 459fe36a6eca91d34becea3ae19fdba3848fbdd8 by Ralf Habacker.
Committed on 03/01/2018 at 13:40.
Pushed by habacker into branch 'Applications/17.12'.

Add additional java test files

A  +5    -0    test/import/java/apackage/subdir/anotherpackage/ApackageSubdirAnotherPackageTest.java
A  +5    -0    test/import/java/apackage/subdir/apackage/ApackageSubdirApackageTest.java

https://commits.kde.org/umbrello/459fe36a6eca91d34becea3ae19fdba3848fbdd8
Comment 5 Ralf Habacker 2018-01-04 02:46:08 UTC
Git commit c11df4aa1fd0f182c0c4b0797aa7035303b61eb9 by Ralf Habacker.
Committed on 03/01/2018 at 13:40.
Pushed by habacker into branch 'Applications/17.12'.

Fix implementation of Import_Utils::createUMLObject() parameter searchInParentPackageOnly

Really limit searching packages to the parent package if specified.
UMLDoc::findUMLObject(), which has been used here before, does not
limit the search to the provided parent package, if specified.

M  +5    -2    umbrello/codeimport/import_utils.cpp

https://commits.kde.org/umbrello/c11df4aa1fd0f182c0c4b0797aa7035303b61eb9
Comment 6 Ralf Habacker 2018-01-04 02:51:35 UTC
Git commit be3b42f9cf186cb24a9fb3865adc63537dc82444 by Ralf Habacker.
Committed on 04/01/2018 at 02:50.
Pushed by habacker into branch 'Applications/17.12'.

Complete java import fix

Previous fix was not enough to fix this bug. Importing
exchange/tree/master/network/src/main/java/io/bisq/network from
https://github.com/bisq-network/ not works.
FIXED-IN:2.24.1 (KDE Applications 17.12.1)

M  +11   -2    umbrello/codeimport/import_utils.cpp
M  +2    -1    umbrello/codeimport/import_utils.h
M  +5    -2    umbrello/codeimport/javaimport.cpp

https://commits.kde.org/umbrello/be3b42f9cf186cb24a9fb3865adc63537dc82444