Summary: | Java import fails to import enum | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | okellogg |
Priority: | NOR | ||
Version: | 2.9.5 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | All | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Test.java
main.java |
Description
Ralf Habacker
2016-09-08 13:11:34 UTC
Created attachment 100984 [details]
Test.java
Created attachment 100985 [details]
main.java
Git commit 372b1e0203847cc8ff7dc79a2a799d9a79b215f9 by Oliver Kellogg. Committed on 11/01/2020 at 15:10. Pushed by okellogg into branch 'release/19.12'. Fix crash on importing Java code attached to bug 368453: The example uses the global scope and JavaImport crashes on adding objects in the global scope without prior defined Java package. umbrello/codeimport/import_utils.{h,cpp} - Add function globalScope() returning the package of the global scope. umbrello/codeimport/nativeimportbase.cpp - In function parseFile() do not push a null pointer as the global scope; instead, push Import_Utils::globalScope(). M +9 -0 umbrello/codeimport/import_utils.cpp M +2 -0 umbrello/codeimport/import_utils.h M +1 -1 umbrello/codeimport/nativeimportbase.cpp https://invent.kde.org/kde/umbrello/commit/372b1e0203847cc8ff7dc79a2a799d9a79b215f9 Observation for narrowing down the problem: After importing the two files, the treeview shows <Class> main <Package> Test | > <Class> Enum (empty) > <Class> Test | > <Enumeration> Enum That looks wrong. If I rename main.java to Umain.java and redo the import, the treeview shows: <Class> Test | > <Enumeration> Enum <Class> Umain That looks right. In the in the first case, main.java is imported before Test.java but in the second case, Test.java is imported after Umain.java. (In reply to Oliver Kellogg from comment #4) > In the in the first case, main.java is imported before Test.java > but in the second case, Test.java is imported after Umain.java. Oops typo: In the second case, Test.java is imported *before* Umain.java. |