[Scilab-Dev] xcos

Clément David Clement.David at esi-group.com
Wed Sep 5 16:21:29 CEST 2018


Hello Johan,

Thanks for taking a look at Xcos, this is a great Scilab functionnality that deserve more love ! I
will try to help you understanding the codebase, do not hesitate to ask if needed.

For Scilab 6, Xcos GUI is coded in Java as you have correctly noted *BUT* the Diagram, Block, Link
and Annotation data (available on Scilab through scicos API) are stored in C++ (to relax memory
constraints on huge diagrams). To pass data from C++ to Java, an object identified by a (ScicosID,
Kind) pair could retrieve its properties through a Controller object. The GUI fully interacts with
Scilab this way.

You are correct about Bug 14670 fix, to avoid opening twice an XcosDiagram for a specific block (eg.
ScicosID) Scilab 5.5.2 stored a reference to all the opened diagrams and create only a new
XcosDiagram if needed. I will review it, do you know how to use codereview.scilab.org to push fixes
?

Thanks for your help,

--
Clément


Le mardi 28 août 2018 à 21:59 -0300, Johan Wesselink a écrit :
> I have a quick and dirty fix. Not for real use, but it shows a proof of concept. I am certainly
> cutting corners here. 
> 
> Would like to know how to translate this into a better solution?
> Add a function to the Xcos class that returns a diagram based on cell that is passed?
> 
> Started with this simple problem. Really like Xcos, but it is still very broken. Like to
> contribute if possible.
> 
> Thanks.
> 
> 
> Op di 28 aug. 2018 om 17:40 schreef Johan Wesselink <johanwesselink23 at gmail.com>:
> > Good day,
> > 
> > I was having a look into some superblock problems. 
> > In version 6.0.1. there are many problems with the super block.
> > 
> > I have checkout the latest version of the GIT repository and can build and debug it using
> > eclipse. 
> > 
> > On this moment I am interested in Bug 14670 Super block can be opened more then once. 
> > I already discovered that the xcos/block/actian/BlockParametersAction.java contains the method
> > ActionPerformed on line 96 that actually generates the diagram.
> > I am a little bit curious for the architecture.
> > I see that a XcosDiagram is created using the UID, Kind and Id of cell that is the SUPER_f
> > block. This is created diagram is then added to the root diagram. 
> > Maybe a very simplistic view, but is it possible to get the root diagram and search for a sub
> > diagram with the same UID, Kind and Id. And so, if this is present does that mean that the
> > diagram is already created and that it only should be shown?
> > Or do not understand how it works.
> > 
> > Sincerely
> > Johan
> > 
> 
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev


More information about the dev mailing list