Package org.eclipse.sirius.business.api.session

Examples of org.eclipse.sirius.business.api.session.Session


   * @param validForDiagram
   *            Predicate
   * @return List of valid elements
   */
  private List<EObject> allValidSessionElements(EObject cur, Predicate<EObject> validForDiagram) {
    Session found = SessionManager.INSTANCE.getSession(cur);
    List<EObject> result = Lists.newArrayList();
    if (found != null) {
      for (Resource res : found.getSemanticResources()) {
        Iterators.addAll(result, Iterators.filter(res.getAllContents(), validForDiagram));
      }
    }
    return result;
  }
View Full Code Here


   * @param element
   *            element
   * @return Parent view
   */
  public DNodeContainer getParentView(Element element) {
    Session session = SessionManager.INSTANCE.getSession(element);
    Collection<Setting> refs = session.getSemanticCrossReferencer().getInverseReferences(
        element.eContainer());
    for (Setting setting : refs) {
      if (setting.getEObject() instanceof DNodeContainer) {
        return (DNodeContainer)setting.getEObject();
      }
View Full Code Here

TOP

Related Classes of org.eclipse.sirius.business.api.session.Session

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.