Bug 53361 - update code import code
Summary: update code import code
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-24 18:12 UTC by Jonathan Riddell
Modified: 2004-04-14 10:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Riddell 2003-01-24 18:12:34 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

The import code is taken from an old version of KDevelop.  

Investigate using more up to date KDevelop libraries.
Comment 1 Oliver Kellogg 2003-11-25 22:15:08 UTC
I am having a look at updating the code import to use
kdevelop's new CodeModel, and it looks promising so far.
For example, the way methods and attributes are represented
in the CodeModel is very much in line with Umbrello.

Using the CodeModel could also open the door for integration
with kdevelop. As a first step, large parts of kdevelop's
programming language parsers/Abstract Syntax Tree walkers
could be reused with little change.

However, the current CodeModel is still too C++ centric.
Examples:
1. The concept of "interface" is not there yet.
2. The CodeModel is capable of representing C++'s nested
   classes - something not possible in standard UML.
   (So probably nested classes would not appear in the
   UML model?)

I will contact Roberto Raggi, architect of the kdevelop
CodeModel, to further discuss this.
Comment 2 Sebastian Stein 2003-11-25 22:30:26 UTC
Subject: Re: [Uml-devel]  update code import code

Oliver Kellogg <okellogg@users.sourceforge.net> [031125 22:24]:
> I am having a look at updating the code import to use
> kdevelop's new CodeModel, and it looks promising so far.
> For example, the way methods and attributes are represented
> in the CodeModel is very much in line with Umbrello.

This would be a very good way to go, but please no patches for this before
KDE 3.2 is released!

Steinchen 
Comment 3 Oliver Kellogg 2003-12-08 19:23:53 UTC
Roberto,

Another place where I find the CodeModel incomplete is: comments.
What do you think about adding a comment node to the CodeModel?

Background: Promotion of oxygen comments was recently added
to the Umbrello C++ class import. However, this is in the C++
specific part. IMHO what is needed here is a source language
independent representation for comments.
Comment 4 Roberto Raggi 2003-12-09 10:24:03 UTC
Subject: Re:  update code import code

Hi!

On Monday 08 December 2003 19:23, Oliver Kellogg wrote:
> ------- Additional Comments From okellogg@users.sourceforge.net  2003-12-08
> 19:23 ------- Roberto,
>
> Another place where I find the CodeModel incomplete is: comments.
> What do you think about adding a comment node to the CodeModel?
I agree, I will add it after kdevelop 3.0 final :)

ciao robe

Comment 5 Oliver Kellogg 2004-03-30 07:55:09 UTC
Here's a question for Alex and Robe:

How are the entities in the CodeModel identified?

In Umbrello, each UML entity gets a unique model ID upon its
creation. The model ID is used just about everywhere in the
umbrello code for identifying the model element. (For example,
many of the Qt signals used just transport the model ID and
not much else.)

The question of identity is important if we want to replace
umbrello's current model classes by the CodeModel.

Thanks,

Oliver
Comment 6 Oliver Kellogg 2004-04-13 17:39:55 UTC
Resolved, albeit in a lazy way: Just use the cppparser.

Of course, the Right Thing would be to replace the umbrello
model classes (UMLClassifier, UMLOperation, etc.) by their
counterparts in the CodeModel, or - more ambitiously - turn
umbrello's core workings into a plugin that could be used
either in a standalone environment, or by kdevelop.

BTW, promotion of comments is lost because cppparser/ast.h
lacks a NodeType_Comment.
Comment 7 Roberto Raggi 2004-04-14 10:00:40 UTC
> 17:39 ------- Resolved, albeit in a lazy way: Just use the cppparser.
> BTW, promotion of comments is lost because cppparser/ast.h
> lacks a NodeType_Comment.
I'm improving the codemodel and the cppparser, because atm it doesn't support 
doxygen like comments :( just wait a few days

ciao robe