Comments (5)
Using a query seems overkill for a 1-step check (going up or down only once).
This can be done with: childEntity parents includes: parentEntity
.
To lazily compute parents, we could have a method in TEntityMetaLevelDependency
like:
parentsInclude: anEntity
self parentsDo: [ :parent | parent == anEntity ifTrue: [ ^ true ] ].
^ false
There is currently no childrenDo:
for the reverse operation, but this can also be addressed.
from famix.
not convinced
Maybe a query #allAncestors would be a nice alternative to this ?
from famix.
Using a query seems overkill for a 1-step check (going up or down only once). This can be done with:
childEntity parents includes: parentEntity
. To lazily compute parents, we could have a method inTEntityMetaLevelDependency
like:parentsInclude: anEntity self parentsDo: [ :parent | parent == anEntity ifTrue: [ ^ true ] ]. ^ falseThere is currently no
childrenDo:
for the reverse operation, but this can also be addressed.
The advantage of using a query would be the performances. But I don't know if Benoit need better performances on this for now?
from famix.
In fact, I do not need this right now. But I thought about it because of the performance aspect.
I also can understand if you think it is overkill and do not want to address this issue :) I know it takes time and there are other projects
from famix.
Ok, until real use case, let's close this
from famix.
Related Issues (20)
- FamixMetamodelGenerator should only have direct children
- Rename methods with #MSEProperties to #FameProperties
- Rework #numberOfComments? HOT 4
- remove #flag: from FamixMetamodelBuilder >> getTraitNamed: HOT 1
- clarify baseline HOT 2
- It should not be possible to tag an entity several times HOT 3
- FamixJavaVisitor is outdated HOT 1
- Bug annotation type added to package HOT 2
- asOrderedCollection can't be used correctly for getting targets HOT 1
- Questions on Generics meta-model
- MooseGroup do not understand message `#collectWithIndex:`
- Why TComment uses TEntityMetaLevelDependency HOT 2
- add methods #newClassNamed: to FamixMetamodelGenerator
- Port new Generic modeling to FamixCpp
- Example method is not FamixJavaParametricMethod according to the documentation
- simplify MooseObject>>#attributeAt: / #cacheAt: / propertyAt: HOT 7
- FamixStAttribute>>isSharedVariable is volatile
- CyclomaticComplexity of Pharo importer HOT 1
- Should FamixTFile be able to hold source text? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from famix.