<div dir="ltr"><div>I will have a look at gerrit. I already did some reading on the subject. Interesting stuff.</div><div><br></div><div>Thanks.<br></div></div><br><div class="gmail_quote"><div dir="ltr">Op wo 5 sep. 2018 om 16:09 schreef Johan Wesselink <<a href="mailto:johanwesselink23@gmail.com">johanwesselink23@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I am aware that it is a MVC architecture. The Model in this case is the C++ part. The controller is instantiated in JAVA and has a JNI interface. <br></div><div>The view in this case is actually everything that makes the view visible include the diagram structure info. One thing that makes me very curious. The models are made using modelica. How is the image of the model imported into the view? Something I still haven't found (did not yet look very good also). Started simple with the diagram problem. <br></div><div><br></div><div>The fix I made is not very well implemented. It doesn't make me happy, but it works. The idea is that I think that every root diagram has a number of child diagrams. These are created from superblock. If a superblock and all of it recursive children are  converted into a diagram. I noticed that the diagram ID and Kind are equal to the ID and Kind of the superblock. This makes it possible to make a list with diagrams, for a given root, and look at them I simple iterate over them and compare the Kind and ID of the SuperBlock with the those of the diagrams stored in the list.. This works, but for big diagrams this can be done way better. I would prefer a map that maps a superblock to a diagram. This makes it possible to look up a diagram with O(1), which is way faster. Notice that for small diagrams, most practical examples for know there is no measurable performance difference. <br></div><div><br></div><div>I do not know how the CodeReview system works, but I am eager to learn. I think you need some kind of login for it? Or can the normal login be used also?</div><div><br></div><div>My idea is to have a look at some problems with SuperBlocks. These make it very difficult for me to run some older diagrams I have. <br></div><div></div><div><br></div><div>Johan Wesselink<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Op wo 5 sep. 2018 om 11:21 schreef Clément David <<a href="mailto:Clement.David@esi-group.com" target="_blank">Clement.David@esi-group.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Johan,<br>
<br>
Thanks for taking a look at Xcos, this is a great Scilab functionnality that deserve more love ! I<br>
will try to help you understanding the codebase, do not hesitate to ask if needed.<br>
<br>
For Scilab 6, Xcos GUI is coded in Java as you have correctly noted *BUT* the Diagram, Block, Link<br>
and Annotation data (available on Scilab through scicos API) are stored in C++ (to relax memory<br>
constraints on huge diagrams). To pass data from C++ to Java, an object identified by a (ScicosID,<br>
Kind) pair could retrieve its properties through a Controller object. The GUI fully interacts with<br>
Scilab this way.<br>
<br>
You are correct about Bug 14670 fix, to avoid opening twice an XcosDiagram for a specific block (eg.<br>
ScicosID) Scilab 5.5.2 stored a reference to all the opened diagrams and create only a new<br>
XcosDiagram if needed. I will review it, do you know how to use <a href="http://codereview.scilab.org" rel="noreferrer" target="_blank">codereview.scilab.org</a> to push fixes<br>
?<br>
<br>
Thanks for your help,<br>
<br>
--<br>
Clément<br>
<br>
<br>
Le mardi 28 août 2018 à 21:59 -0300, Johan Wesselink a écrit :<br>
> I have a quick and dirty fix. Not for real use, but it shows a proof of concept. I am certainly<br>
> cutting corners here. <br>
> <br>
> Would like to know how to translate this into a better solution?<br>
> Add a function to the Xcos class that returns a diagram based on cell that is passed?<br>
> <br>
> Started with this simple problem. Really like Xcos, but it is still very broken. Like to<br>
> contribute if possible.<br>
> <br>
> Thanks.<br>
> <br>
> <br>
> Op di 28 aug. 2018 om 17:40 schreef Johan Wesselink <<a href="mailto:johanwesselink23@gmail.com" target="_blank">johanwesselink23@gmail.com</a>>:<br>
> > Good day,<br>
> > <br>
> > I was having a look into some superblock problems. <br>
> > In version 6.0.1. there are many problems with the super block.<br>
> > <br>
> > I have checkout the latest version of the GIT repository and can build and debug it using<br>
> > eclipse. <br>
> > <br>
> > On this moment I am interested in Bug 14670 Super block can be opened more then once. <br>
> > I already discovered that the xcos/block/actian/BlockParametersAction.java contains the method<br>
> > ActionPerformed on line 96 that actually generates the diagram.<br>
> > I am a little bit curious for the architecture.<br>
> > I see that a XcosDiagram is created using the UID, Kind and Id of cell that is the SUPER_f<br>
> > block. This is created diagram is then added to the root diagram. <br>
> > Maybe a very simplistic view, but is it possible to get the root diagram and search for a sub<br>
> > diagram with the same UID, Kind and Id. And so, if this is present does that mean that the<br>
> > diagram is already created and that it only should be shown?<br>
> > Or do not understand how it works.<br>
> > <br>
> > Sincerely<br>
> > Johan<br>
> > <br>
> <br>
> _______________________________________________<br>
> dev mailing list<br>
> <a href="mailto:dev@lists.scilab.org" target="_blank">dev@lists.scilab.org</a><br>
> <a href="http://lists.scilab.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/dev</a><br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@lists.scilab.org" target="_blank">dev@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/dev</a><br>
</blockquote></div>
</blockquote></div>