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

Examples of org.springframework.ide.eclipse.core.model.ISourceModelElement


        return new JavaElementHyperlink(hyperlinkRegion, type);
      }
    } else if ("custom-converter-id".equals(attrName)) {
      //search spring-bean that uses our mapping file and return the mapping
      //for the customconverter-id map-property
      ISourceModelElement modelElement = getModelElementForCustomConverter(BeansEditorUtils.getFile(document), target);
         
      if (modelElement != null) {
        return new SourceModelHyperlink(modelElement, hyperlinkRegion);
      }
    } else if ("a".equals(nodeName) || "b".equals(nodeName) ) {
View Full Code Here


    String uri = NamespaceUtils.getNameSpaceURI(componentDefinition);
    IModelElementProvider provider = elementProviders.get(uri);
    if (provider == null) {
      provider = DEFAULT_ELEMENT_PROVIDER;
    }
    ISourceModelElement element = provider.getElement(BeansConfig.this, componentDefinition);
    if (element instanceof IBean) {
      beans.put(element.getElementName(), (IBean) element);
    }
    else if (element instanceof IBeansComponent) {
      components.add((IBeansComponent) element);
    }
  }
View Full Code Here

              String uri = NamespaceUtils.getNameSpaceURI(componentDefinition);
              IModelElementProvider provider = elementProviders.get(uri);
              if (provider == null) {
                provider = DEFAULT_ELEMENT_PROVIDER;
              }
              ISourceModelElement element = provider.getElement(importedBeansConfig, componentDefinition);
              if (element instanceof IBean) {
                importedBeansConfig.addBean((IBean) element);
              }
              else if (element instanceof IBeansComponent) {
                importedBeansConfig.addComponent((IBeansComponent) element);
View Full Code Here

      final int numArguments = (mergedBd.getConstructorArgumentValues() == null ? 0 : mergedBd
          .getConstructorArgumentValues().getArgumentCount());
      try {
        // Make sure that the constructor exists and we need
        if (!Introspector.hasConstructor(type, numArguments, true)) {
          ISourceModelElement element = BeansModelUtils.getFirstConstructorArgument(bean);
          if (element == null) {
            element = bean;
          }

          AnnotationMetadata metadata = getAnnotationMetadata(context.getClassReaderFactory(), bean, type);
View Full Code Here

      return element;
    }

    public boolean visit(IModelElement element, IProgressMonitor monitor) {
      if (element instanceof ISourceModelElement) {
        ISourceModelElement sourceElement = (ISourceModelElement) element;
        if (sourceElement.getElementResource().equals(file)
            && (sourceElement.getElementStartLine() <= startLine || sourceElement.getElementStartLine() - 1 <= startLine)
            && endLine <= sourceElement.getElementEndLine()) {
          this.element = element;

          if (sourceElement.getElementStartLine() == startLine
              && endLine == sourceElement.getElementEndLine()) {
            startLine = -1;
            endLine = -1;
            return false;
          }
          return true;
View Full Code Here

    IResourceModelElement sourceElement;
    IResource resource = null;
    ZipEntryStorage zipEntryStorage = null;
    int line;
    if (element instanceof ISourceModelElement) {
      ISourceModelElement source = (ISourceModelElement) element;
      sourceElement = source.getElementSourceElement();
      line = source.getElementStartLine();
      Resource res = source.getElementSourceLocation().getResource();
      if (res instanceof IAdaptable) {
        resource = (IResource) ((IAdaptable) res)
            .getAdapter(IResource.class);
        zipEntryStorage = (ZipEntryStorage) ((IAdaptable) res)
            .getAdapter(ZipEntryStorage.class);
View Full Code Here

    String uri = NamespaceUtils.getNameSpaceURI(componentDefinition);
    IModelElementProvider provider = elementProviders.get(uri);
    if (provider == null) {
      provider = BeansConfig.DEFAULT_ELEMENT_PROVIDER;
    }
    ISourceModelElement element = provider.getElement(BeansJavaConfig.this, componentDefinition);
    if (element instanceof IBean) {
      beans.put(element.getElementName(), (IBean) element);
    }
    else if (element instanceof IBeansComponent) {
      components.add((IBeansComponent) element);
    }
  }
View Full Code Here

    if (element instanceof IBeansImport) {
      severity = getSeverityForImport((IBeansImport) element);
    }
    else if (element instanceof ISourceModelElement) {
      ISourceModelElement source = (ISourceModelElement) element;
      severity = MarkerUtils.getHighestSeverityFromMarkersInRange(source.getElementResource(), source
          .getElementStartLine(), source.getElementEndLine());
    }
    else if (element instanceof IResourceModelElement) {
      if (element instanceof IBeansProject) {
        int s = 0;
        for (IBeansConfig config : ((IBeansProject) element).getConfigs()) {
View Full Code Here

            IProgressMonitor monitor) {
          if (doesMatch(element, compiledPattern, monitor)) {
            int startLine;
            int lines;
            if (element instanceof ISourceModelElement) {
              ISourceModelElement sourceElement =
                (ISourceModelElement) element;
              startLine = sourceElement.getElementStartLine();
              lines = sourceElement.getElementEndLine()
                  - startLine + 1;
            } else {
              startLine = -1;
              lines = -1;
            }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.core.model.ISourceModelElement

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.