Package org.springframework.ide.eclipse.beans.core.model

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfig


  }

  private static boolean isBeansConfig(IFile configFile, boolean includeImports) {
    IBeansProject project = BeansCorePlugin.getModel().getProject(configFile.getProject());
    if (project != null) {
      IBeansConfig bc = getBeansConfig(configFile, project, includeImports);
      if (bc != null)
        return true;
    }

    for (IBeansProject p : BeansCorePlugin.getModel().getProjects()) {
      IBeansConfig bc = getBeansConfig(configFile, p, includeImports);
      if (bc != null)
        return true;
    }

    return false;
View Full Code Here


      final IModelElementVisitor visitor = new IModelElementVisitor() {
        public boolean visit(final IModelElement element, IProgressMonitor monitor) {

          if (element instanceof IBeansConfig) {
            final IBeansConfig config = (IBeansConfig) element;

            monitor.beginTask("Matching pointcut in file ["
                + config.getElementResource().getProjectRelativePath().toString() + "]", 100);

            IProject project = config.getElementResource().getProject();
            try {
              // get beans before messing around with the class
              // loader
              final Set<IBean> beans = BeansModelUtils.getBeans(config);
View Full Code Here

      IFileEditorInput editorInput = (IFileEditorInput) editor.getEditorInput();
      IFile file = editorInput.getFile();

      if (file != null && BeansContextStructureBridge.isBeansConfig(file)) {

        final IBeansConfig beansConfig = BeansCorePlugin.getModel().getConfig(file);

        workbench.getDisplay().asyncExec(new Runnable() {

          public void run() {
            if (viewer instanceof StructuredTextEditor
View Full Code Here

  }

  public Set<IBeansConfig> getConfigs() {
    Set<IBeansConfig> configs = new LinkedHashSet<IBeansConfig>();
    for (String configName : getConfigNames()) {
      IBeansConfig config = BeansModelUtils.getConfig(configName, this);
      if (config != null) {
        configs.add(config);
      }
    }
    return configs;
View Full Code Here

        if (this.isAliasesMapPopulated) {
          return aliasesMap;
        }
        aliasesMap = new LinkedHashMap<String, IBeanAlias>();
        for (String configName : configNames) {
          IBeansConfig config = BeansModelUtils.getConfig(configName, this);
          if (config != null) {
            for (IBeanAlias alias : config.getAliases()) {
              if (allowAliasOverriding || !aliasesMap.containsKey(alias.getElementName())) {
                aliasesMap.put(alias.getElementName(), alias);
              }
            }
          }
View Full Code Here

        if (this.isComponentsPopulated) {
          return components;
        }
        components = new LinkedHashSet<IBeansComponent>();
        for (String configName : configNames) {
          IBeansConfig config = BeansModelUtils.getConfig(configName, this);
          if (config != null) {
            for (IBeansComponent component : config.getComponents()) {
              components.add(component);
            }
          }
        }
      }
View Full Code Here

        if (this.isBeansMapPopulated) {
          return beansMap;
        }
        beansMap = new LinkedHashMap<String, IBean>();
        for (String configName : configNames) {
          IBeansConfig config = BeansModelUtils.getConfig(configName, this);
          if (config != null) {
            for (IBean bean : config.getBeans()) {
              if (allowBeanDefinitionOverriding || !beansMap.containsKey(bean.getElementName())) {
                beansMap.put(bean.getElementName(), bean);
              }
            }
          }
View Full Code Here

    AttrImpl aliasAttr = (AttrImpl) node.getAttributes().getNamedItem(BeansSchemaConstants.ATTR_ALIAS);

    String alias = aliasAttr.getNodeValue();

    IBeansConfig config = BeansCorePlugin.getModel().getConfig(file);
    Set<IResourceModelElement> contextElements = getContextElements(config);

    for (IResourceModelElement contextElement : contextElements) {
      if (aliasAttrValidator.validateAttributeWithConfig(config, contextElement, file, aliasAttr, node, reporter,
          true, validator, alias)) {
View Full Code Here

    AttrImpl attr = (AttrImpl) beanNode.getAttributes().getNamedItem(BeansSchemaConstants.ATTR_REF);
    if (attr == null) {
      attr = (AttrImpl) beanNode.getAttributes().getNamedItem(BeansSchemaConstants.ATTR_PARENT);
    }

    IBeansConfig config = BeansCorePlugin.getModel().getConfig(file);
    Set<IResourceModelElement> contextElements = getContextElements(config);
    for (IResourceModelElement contextElement : contextElements) {
      if (beanRefAttrValidator.validateAttributeWithConfig(config, contextElement, attr, beanNode, reporter,
          true, validator)) {
        return true;
View Full Code Here

    IDOMNode constructorArgNode = QuickfixTestUtil.getFirstNode(BeansSchemaConstants.ELEM_CONSTRUCTOR_ARG,
        beanChildren);

    AttrImpl attr = (AttrImpl) constructorArgNode.getAttributes().getNamedItem(BeansSchemaConstants.ATTR_REF);

    IBeansConfig config = BeansCorePlugin.getModel().getConfig(file);
    Set<IResourceModelElement> contextElements = getContextElements(config);
    for (IResourceModelElement contextElement : contextElements) {
      if (beanRefAttrValidator.validateAttributeWithConfig(config, contextElement, attr, constructorArgNode,
          reporter, true, validator)) {
        return true;
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.beans.core.model.IBeansConfig

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.