Examples of IBeansModelElement


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

    }
  }

  private IBeansModelElement getBeansModelElement(AttrImpl attribute, IDOMNode parent, IFile file, String text) {

    IBeansModelElement element = null;
    IDOMNode beanNode = getParentBeanNode(parent);
    if (beanNode == null) {
      return null;
    }
View Full Code Here

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

    ValidationRuleDefinition ruleDefinition = getValidationRule(project, BeanReferenceRule.class);
    BeanReferenceRule refRule = (BeanReferenceRule) (ruleDefinition != null ? ruleDefinition.getRule() : null);

    if (refRule != null) {

      IBeansModelElement modelElement = getBeansModelElement(attribute, parent, file, text);
      if (modelElement == null) {
        return false;
      }

      BeanReferenceValidationContextHelper context = new BeanReferenceValidationContextHelper(attribute, parent,
View Full Code Here

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

    final IEditorInput editorInput = editor.getEditorInput();
    if (editorInput != null) {
      Job updateFromEditor = new Job("Loading RequestMappings") {
        @Override
        protected IStatus run(IProgressMonitor monitor) {
          IBeansModelElement input = getInputFromEditor(editorInput);
          if (input != null) {
            element = input;
          } else {
            element = null;
          }
View Full Code Here

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

          .getFirstElement();
      if (obj != null) {
        Job updateFromSelection = new Job("Loading RequestMappings") {
          @Override
          protected IStatus run(IProgressMonitor monitor) {
            IBeansModelElement input = getInputFromSelection(obj);
            if (input != null) {
              element = input;
            } else {
              element = null;
            }
View Full Code Here

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

  }

  private IBeansModelElement getInputFromEditor(IEditorInput editorInput) {
    IJavaElement javaElement = JavaUI
        .getEditorInputJavaElement(editorInput);
    IBeansModelElement modelElement = getInputFromJavaElement(javaElement);
    if (modelElement == null && editorInput instanceof IFileEditorInput) {
      IFile file = ((IFileEditorInput) editorInput).getFile();
      modelElement = getInputFromFile(file);
    }
    // TODO: support IStorageEditorInput??
View Full Code Here

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

    // TODO: support IStorageEditorInput??
    return modelElement;
  }

  private IBeansModelElement getInputFromFile(IFile file) {
    IBeansModelElement modelElement = BeansCorePlugin.getModel().getConfig(
        file);
    if (modelElement == null) {
      IProject project = file.getProject();
      modelElement = BeansCorePlugin.getModel().getProject(project);
    }
View Full Code Here

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

    }
    return modelElement;
  }

  private IBeansModelElement getInputFromJavaElement(IJavaElement javaElement) {
    IBeansModelElement modelElement = null;
    if (javaElement != null) {
      IJavaProject project = javaElement.getJavaProject();
      if (project != null) {
        modelElement = BeansCorePlugin.getModel().getProject(
            project.getProject());
View Full Code Here

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

      return (IBeansModelElement) obj;
    }
    if (obj instanceof BeanMetadataReference) {
      return ((BeanMetadataReference) obj).getBeansProject();
    }
    IBeansModelElement modelElement = null;
    if (obj instanceof IJavaElement) {
      modelElement = getInputFromJavaElement((IJavaElement) obj);
    }
    if (modelElement == null && obj instanceof IFile) {
      modelElement = getInputFromFile((IFile) obj);
View Full Code Here

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

    IResource resource = getResourceFromDropTarget(dropTargetEvent);

    // handle drag'n drop from resource
    if (SpringCoreUtils.isSpringProject(resource) && resource instanceof IFile) {
      IFile file = (IFile) resource;
      IBeansModelElement parent = getBeansModelElementFromTarget(resource, target);
      // handle resource drop to project or IWorkspaceRoot
      if (parent instanceof BeansProject) {
        BeansProject beansProject = (BeansProject) parent;
        // check if target project is actually the parent of resource
        IProject project = getProject(parent);
View Full Code Here

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

  }

  @Override
  protected boolean isEnabled(IStructuredSelection selection) {
    Object treeElement = selection.getFirstElement();
    IBeansModelElement modelElement = null;
    if (treeElement instanceof IBeansProject) {
      modelElement = (IBeansProject) treeElement;
    } else if (treeElement instanceof IBeansConfig) {
      modelElement = (IBeansConfig) treeElement;
    } else if (treeElement instanceof IBeansConfigSet) {
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.