Examples of LiveBean


Examples of org.springframework.ide.eclipse.beans.ui.livegraph.model.LiveBean

  public void run() {
    IStructuredSelection selection = getStructuredSelection();
    List elements = selection.toList();
    for (Object obj : elements) {
      if (obj instanceof LiveBean) {
        LiveBean bean = (LiveBean) obj;
        LiveBeansSession appName = bean.getSession();
        String beanClass = bean.getBeanType();
        if (appName != null) {
          if (beanClass != null && beanClass.trim().length() > 0) {
            if (beanClass.startsWith("com.sun.proxy")) {
              // Special case for proxy beans, extract the type
              // from the resource field
              String resource = bean.getResource();
              if (resource != null && resource.trim().length() > 0 && !resource.equalsIgnoreCase(null)) {
                String resourcePath = extractResourcePath(resource);
                if (resourcePath.endsWith(".class")) {
                  openInEditor(appName, extractClassName(resourcePath));
                }
              }
            }
            else {
              openInEditor(appName, beanClass);
            }
          }
          else {
            // No type field, so infer class from bean ID
            openInEditor(appName, bean.getId());
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.ui.livegraph.model.LiveBean

  protected boolean updateSelection(IStructuredSelection selection) {
    if (!selection.isEmpty()) {
      List elements = selection.toList();
      for (Object obj : elements) {
        if (obj instanceof LiveBean) {
          LiveBean bean = (LiveBean) obj;
          String beanClass = bean.getBeanType();
          if (beanClass != null && beanClass.trim().length() > 0) {
            return true;
          }
          else {
            return hasTypeInProject(bean.getSession(), bean.getId());
          }
        }
      }
    }
    return false;
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.ui.livegraph.model.LiveBean

      LiveBeansGroup group = (LiveBeansGroup) parentElement;
      return group.getBeans().toArray();
    }
    else if (parentElement instanceof LiveBean) {
      Set<LiveBeanRelation> children = new HashSet<LiveBeanRelation>();
      LiveBean bean = (LiveBean) parentElement;
      Set<LiveBean> dependencies = bean.getDependencies();
      for (LiveBean child : dependencies) {
        children.add(new LiveBeanRelation(child, true));
      }
      Set<LiveBean> injectInto = bean.getInjectedInto();
      for (LiveBean child : injectInto) {
        children.add(new LiveBeanRelation(child));
      }
      return children.toArray();
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.ui.livegraph.model.LiveBean

  public boolean hasChildren(Object element) {
    if (element instanceof LiveBeansGroup) {
      return true;
    }
    else if (element instanceof LiveBean) {
      LiveBean bean = (LiveBean) element;
      return !bean.getDependencies().isEmpty() || !bean.getInjectedInto().isEmpty();
    }
    return false;
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.ui.livegraph.model.LiveBean

    List elements = selection.toList();
    LiveBeansSession session = null;
    final List<String> contexts = new ArrayList<String>();
    for (Object obj : elements) {
      if (obj instanceof LiveBean) {
        LiveBean bean = (LiveBean) obj;
        session = bean.getSession();
        String resource = bean.getResource();
        if (resource != null && resource.trim().length() > 0 && !resource.equalsIgnoreCase("null")) {
          String resourcePath = extractResourcePath(resource);
          if (resourcePath.endsWith(".xml")) {
            // Strip the path until we can map it properly to a
            // project resource. For now we're going to traverse
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.ui.livegraph.model.LiveBean

  }

  public Object[] getConnectedTo(Object entity) {
    if (entity instanceof LiveBean) {
      LiveBean bean = (LiveBean) entity;
      return bean.getDependencies().toArray();
    }
    return null;
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.ui.livegraph.model.LiveBean

  protected boolean updateSelection(IStructuredSelection selection) {
    if (!selection.isEmpty()) {
      List elements = selection.toList();
      for (Object obj : elements) {
        if (obj instanceof LiveBean) {
          LiveBean bean = (LiveBean) obj;
          String resource = bean.getResource();
          if (resource != null && resource.trim().length() > 0 && !resource.equalsIgnoreCase("null")) {
            return true;
          }
        }
      }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.ui.livegraph.model.LiveBean

public class InnerBeansViewerFilter extends ViewerFilter {

  @Override
  public boolean select(Viewer viewer, Object parentElement, Object element) {
    if (element instanceof LiveBean) {
      LiveBean bean = (LiveBean) element;
      return !bean.isInnerBean();
    }
    else if (element instanceof LiveBeanRelation) {
      LiveBeanRelation bean = (LiveBeanRelation) element;
      return !bean.isInnerBean();
    }
    return true;
  }
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.