Login | Register
My pages Projects Community openCollabNet

Discussions > issues > [gef-issues] [Issue 346] New - Cannot use Editor in batch mode

Discussion topic

Back to topic list

[gef-issues] [Issue 346] New - Cannot use Editor in batch mode


Author rastaman
Full name Ludovic Maître
Date 2009-07-14 02:43:46 PDT
Message http://gef.tigris.or​g/issues/show_bug.cg​i?id=346
                 Issue #|346
                 Summary|Cannot use Editor in batch mode
       Status whiteboard|
              Issue type|DEFECT
             Assigned to|issues@gef
             Reported by|rastaman

------- Additional comments from rastaman at tigris dot org Tue Jul 14 02:43:46 -0700 2009 -------
Hi Bob!, all,

I work on a "modello-uml-plugin", for converting Modello model files to UML.
Basically my plugin for modello read an XML model file and convert it to an
ArgoUML UML file. During this process i build the class diagram and add the uml
classes i generate from the modello model to it. However when i do this, the
graph is updated and it crash in org.tigris.gef.base.​Editor.damageAll() because
the _jComponent field is null. In order to not beeing blocked by this , i have
patched the method damageAll to not do anything if the _jComponent field of the
editor is null. I attach the patch to this issue, but would like to know if what
i do is wrong or not. Here is the code i use to create/modify the class diagram
(inspired a lot by the reverse enginneering code of argo):
        // Generate the diagram
        UMLClassDiagram clg = null;
        Iterator it = p.getDiagramList().iterator();
        while (it.hasNext() && clg == null) {
            Object dia = it.next();
            if (dia instanceof UMLClassDiagram)
                clg = (UMLClassDiagram) dia;

    // Use DiagramInterface to add classes to diagram
    DiagramInterface diagram = new DiagramInterface(new Editor(clg));
    diagram.setCurrentDi​agram((UMLClassDiagr​am) clg);

        for ( it = classes.iterator(); it.hasNext(); )
            ModelClass modelClass = (ModelClass) it.next();
            Object cls = getUML(modelClass);
            if (Model.getFacade().i​sAClass(cls)
                    && !Model.getFacade().i​sAAssociationClass(c​ls)) {
                diagram.addClass(cls, false);

So is it wrong to do like i do ? My figs are not well arranged on the resulting
diagram, they overlap and are all positionned at the same location (like if
layer.putInPosition was doing nothing). Also is gef suitable for "batch"
creation of diagrams ? (i.e. without ArgoUML running) Should i initialize
something special for my class diagrams to behave better ? Thanks for any hint,

Best regards,

« Previous message in topic | 1 of 3 | Next message in topic »


Show all messages in topic

[gef-issues] [Issue 346] New - Cannot use Editor in batch mode rastaman Ludovic Maître 2009-07-14 02:43:46 PDT
     [gef-issues] [Issue 346] Cannot use Editor in batch mode rastaman Ludovic Maître 2009-07-14 02:45:00 PDT
     [gef-issues] [Issue 346] Cannot use Editor in batch mode bobtarling Bob Tarling 2009-08-04 13:45:58 PDT
Messages per page: