Package org.springframework.ide.eclipse.aop.ui.navigator.model

Examples of org.springframework.ide.eclipse.aop.ui.navigator.model.ClassMethodReferenceNode


          }
        }
      }
      catch (JavaModelException e) {
      }
      ClassMethodReferenceNode node = new ClassMethodReferenceNode(type, me);

      List<IAopReference> references = Activator.getModel().getAllReferences();

      // fields
      try {
        for (IField field : type.getFields()) {
          Object[] obj = getChildren(field);
          if (obj != null && obj.length > 0) {
            for (Object o : obj) {
              node.getDeclareParentReferences().add((IReferenceNode) o);
            }
          }
        }
      }
      catch (JavaModelException e) {
      }

      for (IAopReference reference : references) {
        if (reference.getAdviceType() == ADVICE_TYPE.DECLARE_PARENTS) {
          if (reference.getTarget().equals(type)) {
            node.getDeclaredOnReferences().add(reference);
          }
        }
      }
      // add bean references
      Set<IBeansConfig> configs = BeansCorePlugin.getModel().getConfigs(type.getFullyQualifiedName());
      Set<String> beans = new HashSet<String>();
      for (IBeansConfig config : configs) {
        List<IBean> pBeans = new ArrayList<IBean>();
        pBeans.addAll(config.getBeans());
        pBeans.addAll(BeansModelUtils.getInnerBeans(config));
        for (IBean b : pBeans) {
          if (type.getFullyQualifiedName().equals(BeansModelUtils.getBeanClass(b, config))) {
            beans.add(b.getElementID());
          }
        }
      }
      node.setBeans(beans);
      return new Object[] { node };
    }
    else if (parentElement instanceof IMethod) {
      IMethod method = (IMethod) parentElement;
      List<IAopReference> references = Activator.getModel().getAllReferences();
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.aop.ui.navigator.model.ClassMethodReferenceNode

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.