Bug 158699

Summary: [PATCH] recursive java import not working in umbrello
Product: [Applications] umbrello Reporter: Felix Möller <felix>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Felix Möller 2008-03-02 22:58:07 UTC
Version:           2.0.0 (using KDE 4.0.2)
Installed from:    Compiled From Sources
Compiler:          gcc (SUSE Linux) 4.3.0 20080221 (prerelease) [gcc-4_3-branch revision 132521] 
OS:                Linux

I am unable to import a java project into umbrello which has subdirectories.

It ends with doing things like:
umbrello(14079) NativeImportBase::parseFile: "NativeImportBase::parseFile(////////////////////////////////////////////////////////////////////////////////home/fm/eclipse/wwu.fff.or.mac/src/views/LocalGridBagLayout.java): " adding path  "////////////////////////////////////////////////////////////////////////////////home/fm/eclipse/wwu.fff.or.mac/src/views"
umbrello(14079) NativeImportBase::parseFile: "NativeImportBase::parseFile(////////////////////////////////////////////////////////////////////////////////home/fm/eclipse/wwu.fff.or.mac/src/views/LocalGridBagLayout.java): " parsing.

Applying the attached path seems to solve the problem for me:
Index: umbrello/codeimport/javaimport.cpp
===================================================================
--- umbrello/codeimport/javaimport.cpp  (Revision 781148)
+++ umbrello/codeimport/javaimport.cpp  (Arbeitskopie)
@@ -162,7 +162,7 @@
         file.pop_back();
     }
     // this is now the root of any further source imports
-    QString sourceRoot = '/' + file.join("/") + '/';
+    QString sourceRoot = file.join("/") + '/';

     for (QStringList::Iterator pathIt = m_imports.begin();
                                    pathIt != m_imports.end(); ++pathIt) {

please review, as I do not understand C++.
Comment 1 Felix Möller 2008-03-02 22:59:40 UTC
http://bugs.kde.org/show_bug.cgi?id=154187 had the same issue but without subdirectories. ;)
Comment 2 Jonathan Riddell 2008-03-02 23:40:33 UTC
SVN commit 781470 by jriddell:

Fix recursive java import
>From   Felix Möller

BUG:158699


 M  +1 -1      javaimport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=781470