Bug 158699 - [PATCH] recursive java import not working in umbrello
Summary: [PATCH] recursive java import not working in umbrello
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-02 22:58 UTC by Felix Möller
Modified: 2008-03-02 23:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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