[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kuml-devel
Subject:    Thoughts about source files / UML synchronisation
From:       p_george <p_george () club-internet ! fr>
Date:       2000-02-16 17:24:02
[Download RAW message or body]

The problem is how to synchronize UML repository and source files when
the user may at any time modify both ?

There are two cases to consider :

1.The user imports source files into an UML diagram that may already
contains some classes from different or the same (modified) files :

- For all files that were already imported, skip them if their timestamp
is older than the date of the previous import ;
- Fill in the parser repository with the source files' content;
- For every class, methods and attributes :

    if they already exist -> skip it,
    if they don't already exist -> add it,
    in case of an attribute or method of a given class, remove it if it
is present in the diagram but not in the source file.

- Update the timestamp for source files.

2.The user modifies UML diagrams and generates source files :

The problem here is not to erase manual changes made with an editor in
the source files, that were previously generated. We don't use here any
special tag or identifiers showing what was generated with kuml, because
it is really too ugly.

I suppose that if the source was manually modified (adding or deleting
an attribute or a method to a class for example), the code generation
will lose these changes (because there is no mean to know where the
changes are coming from, and what are the intentions of the user). Then,
either the user makes a fresh import before modiying the UML diagrams,
or some changes in source files may be lost : the user should then
always use the UML diagrams to make changes in classes, attributes and
methods (but his changes are kept if he implemented a function, of
course).
The parser must be able to pick up the lines that need changes, which
will imply some modifications to existing parsers' code.

I will start make these changes in order (first the incremental
parsing).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic