Hi!
I am building a small meta-models for c++ analysis. I have created a class called PCPPFunction, a subclass of MooseEntity. (I know there is a FAMIXFunction, but the PCPPFunction is radically different from FAMIXFunction because if contains many information about dynamic analysis). When I visualize instance of PCPPFunction, and I click on one, I get an error: I guess I did not properly define the metamodel behind. But I do not see what is wrong. Here are the definitions: PCPPObject class>>annotation <MSEClass: #PCPPObject super: #MooseEntity> <package: #ProfilerCPP> ^ self PCPPFunction class>>annotation <MSEClass: #PCPPFunction super: #PCPPObject> <package: #ProfilerCPP> ^ self Is this not enough? Why is there a call to mooseDescription? Help appreciated Cheers, Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Yes, that's enough. But, if you created these classes from scratch, you should also ensure that you refresh the meta-model :). You can do it from the menu of the Meta Browser, or you can just execute: MooseModel resetMeta Doru On Thu, Mar 12, 2015 at 3:58 PM, Alexandre Bergel <[hidden email]> wrote:
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ah yes!!!!
Good point! I forgot this point. Would it make sense to have a check as follows? complexPropertyPragmas | navProps definedProps | self mooseDescription ifNil: [ Error signal: 'Moose description are not initialized. Have you refreshed the meta-model? (e.g., MooseModel resetMeta)' ]. navProps := (Pragma allNamed: #navigation: from: self class to: MooseEntity) sorted: [ :a :b | (a argumentAt: 1) < (b argumentAt: 1) ]. definedProps := (self mooseDescription allAttributes reject: [ :a | a type isPrimitive ]) flatCollect: [ :prop | (prop mmClass implementingClass >> prop implementingSelector) pragmas select: [ :each | each keyword beginsWith: 'MSEProperty:' ] ]. ^ (OrderedCollection withAll: definedProps) addAll: navProps; yourself I can commit. Cheers, Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Nice one. Go ahead :) Doru On Thu, Mar 12, 2015 at 6:19 PM, Alexandre Bergel <[hidden email]> wrote:
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Done!
Alexandre > On Mar 12, 2015, at 4:52 PM, Tudor Girba <[hidden email]> wrote: > > Nice one. Go ahead :) > > Doru > > On Thu, Mar 12, 2015 at 6:19 PM, Alexandre Bergel <[hidden email]> wrote: > Ah yes!!!! > > Good point! > I forgot this point. > > Would it make sense to have a check as follows? > > complexPropertyPragmas > | navProps definedProps | > self mooseDescription ifNil: [ Error signal: 'Moose description are not initialized. Have you refreshed the meta-model? (e.g., MooseModel resetMeta)' ]. > > navProps := (Pragma allNamed: #navigation: from: self class to: MooseEntity) > sorted: [ :a :b | (a argumentAt: 1) < (b argumentAt: 1) ]. > definedProps := (self mooseDescription allAttributes reject: [ :a | a type isPrimitive ]) > flatCollect: [ :prop | > (prop mmClass implementingClass >> prop implementingSelector) pragmas > select: [ :each | each keyword beginsWith: 'MSEProperty:' ] ]. > ^ (OrderedCollection withAll: definedProps) > addAll: navProps; > yourself > > I can commit. > > Cheers, > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > >> On Mar 12, 2015, at 12:16 PM, Tudor Girba <[hidden email]> wrote: >> >> Yes, that's enough. But, if you created these classes from scratch, you should also ensure that you refresh the meta-model :). >> >> You can do it from the menu of the Meta Browser, or you can just execute: >> MooseModel resetMeta >> >> Doru >> >> On Thu, Mar 12, 2015 at 3:58 PM, Alexandre Bergel <[hidden email]> wrote: >> Hi! >> >> I am building a small meta-models for c++ analysis. >> I have created a class called PCPPFunction, a subclass of MooseEntity. (I know there is a FAMIXFunction, but the PCPPFunction is radically different from FAMIXFunction because if contains many information about dynamic analysis). >> >> When I visualize instance of PCPPFunction, and I click on one, I get an error: >> >> <Screen Shot 2015-03-12 at 11.53.08 AM.png> >> >> I guess I did not properly define the metamodel behind. But I do not see what is wrong. Here are the definitions: >> >> PCPPObject class>>annotation >> <MSEClass: #PCPPObject super: #MooseEntity> >> <package: #ProfilerCPP> >> ^ self >> >> PCPPFunction class>>annotation >> <MSEClass: #PCPPFunction super: #PCPPObject> >> <package: #ProfilerCPP> >> ^ self >> >> >> Is this not enough? Why is there a call to mooseDescription? Help appreciated >> >> Cheers, >> Alexandre >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> >> >> >> -- >> www.tudorgirba.com >> >> "Every thing has its own flow" >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > > > -- > www.tudorgirba.com > > "Every thing has its own flow" > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |