Thanks. After downloading the current Moose version and using the other method you suggested it works for me :-) Thank you for providing the Java parser. Best regards Meinert > Am 10.08.2016 um 16:36 schrieb Tudor Girba <[hidden email]>: > > Hi, > > I now fixed the providerTypes error (including a test). Please try with the latest Moose 6.0 image. > > Cheers, > Doru > > >> On Aug 10, 2016, at 3:49 PM, Tudor Girba <[hidden email]> wrote: >> >> Hi, >> >> Welcome back :) >> >>> On Aug 10, 2016, at 9:04 AM, Meinert Schwartau <[hidden email]> wrote: >>> >>> Hi, >>> >>> I want to display the dependencies between my classes. I wonder why the following code does not work, it displays the classes in a circle but not the edges between them. I’m using Moose 6 und Pharo 5 (downloaded yesterday) and evaluated the following code in the moose panel in the evaluator: >>> >>> |view| >>> view := RTMondrian new. >>> view nodes: ArrayedCollection withAllSubclasses. >>> view edges: (ArrayedCollection withAllSubclasses) from: [ :cls | cls yourself ] to: [ :cls | cls referencedClasses ]. >>> view circleLayout. >>> view >> >> In your script, from:to: connects one source node with one target node returned by evaluating the corresponding blocks. However, your to: blocks return a collection, and the engine will try to find a node that has that collection as a model. >> >> What you want is to iterate over all items in the collection and connect the source node to each of the target nodes. >> >> To this end, you should use toAll: >> >> |view| >> view := RTMondrian new. >> view nodes: ArrayedCollection withAllSubclasses. >> view edges source: (ArrayedCollection withAllSubclasses) connectFrom: [ :cls | cls yourself ] toAll: [ :cls | cls referencedClasses ]. >> view circleLayout. >> view >> >>> >>> Then I tried to display the dependencies between my own classes (parsed by jdt2famix) but got an exception. After clicking on All classes in the moose panel I entered the following code in the evaluator: >>> |view allClasses| >>> view := RTMondrian new. >>> allClasses := self allClasses. >>> view nodes: allClasses. >>> view edges: allClasses from: [ :cls | cls yourself ] to: [ :cls | cls providerTypes]. >>> view circleLayout. >>> view >>> >>> If I execute the code above, I get an “MessageNotUnderstood: reveiver of “atScope:” is nil” exception. If I remove the “view edges: allClasses from: [ :cls | cls yourself ] to: [ :cls | cls providerTypes].” statement I don’t get an exception, the RTMondorian view opens, but no classes are displayed as dots in the view. >> >> Indeed, thanks for reporting. >> >> I also noticed a bug in MooseQuery during the computation of messages like providerTypes. The problem appears when the opposite part of a relationship is nil. For example, when you have an invocation and the target cannot be resolved, the invocation will point to nil, and Moose gets unhappy. This is a problem in Moose and we need to solve it. >> >> Cheers, >> Doru >> >> >>> Any suggestions? >>> >>> Best regards >>> Meinert >>> >>> >>> ______________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.list.inf.unibe.ch/ >> >> -- >> www.tudorgirba.com >> www.feenk.com >> >> "If you can't say why something is relevant, >> it probably isn't." > > -- > www.tudorgirba.com > www.feenk.com > > "From an abstract enough point of view, any two things are similar." > > > > > _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
Hi,
Great. I am happy it works for you. Still, could you tell me if you get any problems reported in jdt2famix-import.problems when you parse your system? Cheers, Doru > On Aug 11, 2016, at 6:12 PM, Meinert Schwartau <[hidden email]> wrote: > > Thanks. After downloading the current Moose version and using the other method you suggested it works for me :-) > > Thank you for providing the Java parser. > > Best regards > Meinert > > > Am 10.08.2016 um 16:36 schrieb Tudor Girba <[hidden email]>: > > > > Hi, > > > > I now fixed the providerTypes error (including a test). Please try with the latest Moose 6.0 image. > > > > Cheers, > > Doru > > > > > >> On Aug 10, 2016, at 3:49 PM, Tudor Girba <[hidden email]> wrote: > >> > >> Hi, > >> > >> Welcome back :) > >> > >>> On Aug 10, 2016, at 9:04 AM, Meinert Schwartau <[hidden email]> wrote: > >>> > >>> Hi, > >>> > >>> I want to display the dependencies between my classes. I wonder why the following code does not work, it displays the classes in a circle but not the edges between them. I’m using Moose 6 und Pharo 5 (downloaded yesterday) and evaluated the following code in the moose panel in the evaluator: > >>> > >>> |view| > >>> view := RTMondrian new. > >>> view nodes: ArrayedCollection withAllSubclasses. > >>> view edges: (ArrayedCollection withAllSubclasses) from: [ :cls | cls yourself ] to: [ :cls | cls referencedClasses ]. > >>> view circleLayout. > >>> view > >> > >> In your script, from:to: connects one source node with one target node returned by evaluating the corresponding blocks. However, your to: blocks return a collection, and the engine will try to find a node that has that collection as a model. > >> > >> What you want is to iterate over all items in the collection and connect the source node to each of the target nodes. > >> > >> To this end, you should use toAll: > >> > >> |view| > >> view := RTMondrian new. > >> view nodes: ArrayedCollection withAllSubclasses. > >> view edges source: (ArrayedCollection withAllSubclasses) connectFrom: [ :cls | cls yourself ] toAll: [ :cls | cls referencedClasses ]. > >> view circleLayout. > >> view > >> > >>> > >>> Then I tried to display the dependencies between my own classes (parsed by jdt2famix) but got an exception. After clicking on All classes in the moose panel I entered the following code in the evaluator: > >>> |view allClasses| > >>> view := RTMondrian new. > >>> allClasses := self allClasses. > >>> view nodes: allClasses. > >>> view edges: allClasses from: [ :cls | cls yourself ] to: [ :cls | cls providerTypes]. > >>> view circleLayout. > >>> view > >>> > >>> If I execute the code above, I get an “MessageNotUnderstood: reveiver of “atScope:” is nil” exception. If I remove the “view edges: allClasses from: [ :cls | cls yourself ] to: [ :cls | cls providerTypes].” statement I don’t get an exception, the RTMondorian view opens, but no classes are displayed as dots in the view. > >> > >> Indeed, thanks for reporting. > >> > >> I also noticed a bug in MooseQuery during the computation of messages like providerTypes. The problem appears when the opposite part of a relationship is nil. For example, when you have an invocation and the target cannot be resolved, the invocation will point to nil, and Moose gets unhappy. This is a problem in Moose and we need to solve it. > >> > >> Cheers, > >> Doru > >> > >> > >>> Any suggestions? > >>> > >>> Best regards > >>> Meinert > >>> > >>> > >>> _______________________________________________ > >>> Moose-dev mailing list > >>> [hidden email] > >>> https://www.list.inf.unibe.ch/listinfo/moose-dev > >> > >> -- > >> www.tudorgirba.com > >> www.feenk.com > >> > >> "If you can't say why something is relevant, > >> it probably isn't." > > > > -- > > www.tudorgirba.com > > www.feenk.com > > > > "From an abstract enough point of view, any two things are similar." > > > > > > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.list.inf.unibe.ch/listinfo/moose-dev -- www.tudorgirba.com www.feenk.com "Not knowing how to do something is not an argument for how it cannot be done." _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
Free forum by Nabble | Edit this page |