Examples of IInteractionElement


Examples of org.eclipse.mylyn.context.core.IInteractionElement

      }
      else if (temporarilyUnfiltered instanceof Tree && isRootElement(object)) {
        return true;
      }

      IInteractionElement element = null;
      if (object instanceof IImplicitlyIntersting) {
        return true;
      }
      else if (object instanceof IInteractionElement) {
        element = (IInteractionElement) object;
View Full Code Here

Examples of org.eclipse.mylyn.context.core.IInteractionElement

              .getResource(), null);
        }
        AbstractContextStructureBridge bridge = ContextCore.getStructureBridge(element);
        if (bridge != null) {
          String handle = bridge.getHandleIdentifier(element);
          IInteractionElement interestElement = ContextCore.getContextManager()
              .getElement(handle);
          if (element != null && isInteresting(interestElement)) {
            return true;
          }
          // TODO CD uncomment this if *really* only interested
View Full Code Here

Examples of org.eclipse.mylyn.context.core.IInteractionElement

  }

  private boolean determineRelevanceForProposedElements(
      BeansJavaCompletionProposal proposal, int baseRelevance,
      String handle) {
    IInteractionElement mylynElement = ContextCorePlugin
        .getContextManager().getElement(handle);
    if (mylynElement.getInterest().isInteresting()) {
      float interest = mylynElement.getInterest().getValue();
      proposal.setRelevance(THRESHOLD_INTEREST + baseRelevance
          + (int) (interest * 10));
      return true;
    }
    return false;
View Full Code Here

Examples of org.eclipse.mylyn.context.core.IInteractionElement

      }
      if (obj instanceof IBeansConfig) {
        return true;
      }

      IInteractionElement node = ContextCore.getContextManager().getElement(getHandleIdentifier(obj));
      if (node != null && node.getInterest().isInteresting()) {
        return false;
      }
    }
    else if ((obj instanceof IFile && isBeansConfig((IFile) obj))) {
      IInteractionElement node = ContextCore.getContextManager().getElement(getHandleIdentifier(obj));
      if (node != null && node.getInterest().isInteresting()) {
        return false;
      }
    }
    // Support for meta data
    else if (obj instanceof BeanMetadataReference) {
      for (Object child : ((BeanMetadataReference) obj).getChildren()) {
        if (!canFilter(child)) {
          return false;
        }
      }
    }
    else if (obj instanceof BeanMetadataNode) {
      IInteractionElement node = ContextCore.getContextManager().getElement(
          ((BeanMetadataNode) obj).getHandleIdentifier());
      if (node != null && node.getInterest().isInteresting()) {
        return false;
      }
      for (Object child : ((BeanMetadataNode) obj).getChildren()) {
        if (!canFilter(child)) {
          return false;
        }
      }
    }
    else if (obj instanceof IClassMetadata) {
      IInteractionElement node = ContextCore.getContextManager().getElement(
          ((IBeanMetadata) obj).getHandleIdentifier());
      if (node != null && node.getInterest().isInteresting()) {
        return false;
      }
      for (Object child : ((IClassMetadata) obj).getMethodMetaData()) {
        if (!canFilter(child)) {
          return false;
        }
      }
    }
    else if (obj instanceof IBeanMetadata) {
      IInteractionElement node = ContextCore.getContextManager().getElement(
          ((IBeanMetadata) obj).getHandleIdentifier());
      if (node != null && node.getInterest().isInteresting()) {
        return false;
      }
    }

    AbstractContextStructureBridge parentBridge = ContextCore.getStructureBridge(parentContentType);
View Full Code Here

Examples of org.eclipse.mylyn.context.core.IInteractionElement

  }

  private void expandIfElementIsOfInterest(ProjectionAnnotationModel annotationModel,
      IStructuredDocument document, ISourceModelElement modelElement) {
    if (annotationModel != null) {
      IInteractionElement mylynElement = ContextCorePlugin.getContextManager().getElement(
          BRIDGE.getHandleIdentifier(modelElement));
      if (mylynElement != null && mylynElement.getInterest().isInteresting()) {
        try {
          int startOffset = document.getLineOffset(modelElement.getElementStartLine());
          int endOffset = document.getLineOffset(modelElement.getElementEndLine());
          int length = endOffset - startOffset;
          annotationModel.expandAll(startOffset, length);
View Full Code Here

Examples of org.eclipse.mylyn.context.core.IInteractionElement

    if (obj instanceof IModelElement) {
      IModelElement modelElement = (IModelElement) obj;

      IModelElement[] children = modelElement.getElementChildren();
      for (IModelElement child : children) {
        IInteractionElement node = ContextCore.getContextManager().getElement(
            getHandleIdentifier(child));
        if (node != null && node.getInterest().isInteresting()) {
          return false;
        }
      }

      if (modelElement instanceof ISpringProject) {
        IProject project = ((ISpringProject) modelElement).getProject();
        IWebflowProject webflowProject = Activator.getModel().getProject(project);
        return canFilter(webflowProject);
      }

      IInteractionElement node = ContextCore.getContextManager().getElement(
          getHandleIdentifier(obj));
      if (node != null && node.getInterest().isInteresting()) {
        return false;
      }
    }
    else if ((obj instanceof IFile && WebflowModelUtils.isWebflowConfig((IResource) obj))) {
      return canFilter(WebflowModelUtils.getWebflowConfig((IFile) obj));
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.