Bug 386698 - Namespace mismatch of types import from java import between object and tree view
Summary: Namespace mismatch of types import from java import between object and tree view
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: importer (show other bugs)
Version: 2.23.2 (KDE Applications 17.08.2)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks: 386479
  Show dependency treegraph
 
Reported: 2017-11-09 22:54 UTC by Ralf Habacker
Modified: 2017-11-12 21:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.23.80 (KDE Applications 17.11.80)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2017-11-09 22:54:54 UTC
How to reproduce ?
1. start umbrello
2. select language "java"
3. import file https://cgit.kde.org/umbrello.git/plain/test/import/java/apackage/Base.java?id=edd187d85cbd92c42a6e4a0ad0a841b2599abfa3
4. import file https://cgit.kde.org/umbrello.git/plain/test/import/java/apackage/Type.java?id=edd187d85cbd92c42a6e4a0ad0a841b2599abfa3
5. Open properties of class Type

What happens ?
The class Type has package path "apackage" but is located at top level in tree view

What is expected ?
Class Type should be located below package "apackage" in tree view
Comment 1 Ralf Habacker 2017-11-11 16:52:24 UTC
Git commit 0053b09126f6cd5057e3cfe8573efd1a184ff675 by Ralf Habacker.
Committed on 11/11/2017 at 16:47.
Pushed by habacker into branch 'master'.

Fix 'Namespace mismatch of types imported from java import between object and tree view'

Unknown types imported from java files are assigned initial to the global namespace.
If the related type is found later, the namespace will be updated. This update was not
propagated to the tree view.

To propagate the update to the tree view it is required to enable the UMLObject::modified()
signal temporary on changing the package parent.

The signal emitting has been moved down in code to be sure that all other changes are applied.
FIXED-IN:2.23.80 (KDE Applications 17.11.80)

M  +5    -2    umbrello/codeimport/import_utils.cpp
M  +10   -0    umbrello/umllistviewitem.cpp

https://commits.kde.org/umbrello/0053b09126f6cd5057e3cfe8573efd1a184ff675
Comment 2 Ralf Habacker 2017-11-12 21:01:09 UTC
Git commit f378d78aff1bf558d076140fc5544afda781a6fc by Ralf Habacker.
Committed on 12/11/2017 at 21:00.
Pushed by habacker into branch 'master'.

Fixup of 0053b0912

Found a better way to update tree view without patching global
document loading state, which may have unwanted side effects.

This approach has been already used in this method.

M  +6    -3    umbrello/codeimport/import_utils.cpp

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