We've got lots of freedom and independence, but you are never on your own when you encounter problems.
Model Navigation
fmp.system.ModelNavigation is a utility class used to navigate in the feature model tree.
- public List getNodes(Node startingNode, String path)
- Returns the node starting at the given node to the node pointed to the given path (of feature name). Works only across solitary features and grouped features. Note that this method will skip any feature group in between a solitary feature and a grouped feature. Returns null if no node was found. Use the ModelNavigation.PATH_SEPARATOR defined in this class. No PATH_SEPARATOR at the beginning of path. - public Node findNodeWithName(Node node, String name)
- Returns the first node (closest to the initial argument) with the given name - public Feature navigateToRootFeature(Node node)
- Returns the root feature (in the sense defined in RoleQuery) of a diagram containing the node or null for model, metamodel and meta-metamodel. - public Node navigateToFirstOrigin(Node node)
- Returns its grand-grand...-grand origin node (the one that no longer has origin itself) of the given node. - public List getSelectedClonables(List clonables)
- Returns nodes from the clonables list that are user or machine selected.