Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EObject.eContainer()


    // Build the element's path
    StringBuilder path = new StringBuilder();
    EObject node = object;
    while (node.eContainer() != null) {
      path.insert(0, getLabel(node, names));
      node = node.eContainer();
      if (node.eContainer() != null) {
        path.insert(0, " / ");
      }
    }
     return getProxyUrlFromObject(object) + "\n" + text + "\n" + path;
View Full Code Here


    StringBuilder path = new StringBuilder();
    EObject node = object;
    while (node.eContainer() != null) {
      path.insert(0, getLabel(node, names));
      node = node.eContainer();
      if (node.eContainer() != null) {
        path.insert(0, " / ");
      }
    }
     return getProxyUrlFromObject(object) + "\n" + text + "\n" + path;
  }
View Full Code Here

    sb.append(EcoreUtil.getURI(element));
    sb.append("\n");
    EObject e = element;

    // Line 2
    while (e.eContainer() instanceof EObject) {
      ItemProviderAdapter ip = ProrUtil.getItemProvider(adapterFactory, e);
      if (ip != null) sb.append(ip.getText(e));
      else sb.append(e.toString());
      e = e.eContainer();
      if (e.eContainer() instanceof EObject) sb.append(" / ");
View Full Code Here

    // Line 2
    while (e.eContainer() instanceof EObject) {
      ItemProviderAdapter ip = ProrUtil.getItemProvider(adapterFactory, e);
      if (ip != null) sb.append(ip.getText(e));
      else sb.append(e.toString());
      e = e.eContainer();
      if (e.eContainer() instanceof EObject) sb.append(" / ");
    }
    sb.append("\n");

    // Line 3-end
View Full Code Here

    while (e.eContainer() instanceof EObject) {
      ItemProviderAdapter ip = ProrUtil.getItemProvider(adapterFactory, e);
      if (ip != null) sb.append(ip.getText(e));
      else sb.append(e.toString());
      e = e.eContainer();
      if (e.eContainer() instanceof EObject) sb.append(" / ");
    }
    sb.append("\n");

    // Line 3-end
    // We built a map for alphabetical sorting.
View Full Code Here

        return new EObjectFilter() {
            @Override
            public boolean matches(Object object) {
                if (object instanceof EObject) {
                    EObject eObj = (EObject) object;
                    return filter.matches(eObj.eContainer());
                }
                return false;
            }
        };
    }
View Full Code Here

      if (object instanceof EObject) {
        EObject eObject = (EObject) object;
        Stack<Object> path = new Stack<Object>();
        while(eObject != null){
          path.push(eObject);
          eObject = eObject.eContainer();
        }
        Object[] segments = new Object[path.size()];
        for(int i = 0; !path.isEmpty(); i++){
          segments[i] = path.pop();
        }
View Full Code Here

          EList<Widget> children = itemUIRegistry.getChildren((LinkableWidget) pageWidget);
          PageBean pageBean = createPageBean(sitemapName, itemUIRegistry.getLabel(pageWidget), itemUIRegistry.getIcon(pageWidget),
              pageId, children, false, isLeaf(children), uri);
          EObject parentPage = pageWidget.eContainer();
          while(parentPage instanceof Frame) {
            parentPage = parentPage.eContainer();
          }
          if(parentPage instanceof Widget) {
            String parentId = itemUIRegistry.getWidgetId((Widget) parentPage);
            pageBean.parent = getPageBean(sitemapName, parentId, uri);
            pageBean.parent.widgets = null;
View Full Code Here

  @Check
  public void checkNoCodeInTitle(CodeBlock code) {
    if(!LatexUtils.inline(code)) {
      EObject tom = code.eContainer();
      while(!(tom.eContainer() instanceof AbstractSection)){
        tom = tom.eContainer();
      }
      if(tom.eContainer() instanceof AbstractSection) {
        AbstractSection section = (AbstractSection) tom.eContainer();
        if(section.getTitle() == tom) {
View Full Code Here

  @Check
  public void checkNoCodeInTitle(CodeBlock code) {
    if(!LatexUtils.inline(code)) {
      EObject tom = code.eContainer();
      while(!(tom.eContainer() instanceof AbstractSection)){
        tom = tom.eContainer();
      }
      if(tom.eContainer() instanceof AbstractSection) {
        AbstractSection section = (AbstractSection) tom.eContainer();
        if(section.getTitle() == tom) {
          error("Headings can not contain code blocks", null);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.