Examples of IInvocationContext


Examples of org.eclipse.jdt.ui.text.java.IInvocationContext

  public void testMethod2VariablesNoPathVariable() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("variablesNoPathVariable", new String[] { "I", "I" });
    ISourceRange sourceRange = method.getSourceRange();
    MethodDeclaration methodDecl = (MethodDeclaration) getASTNode(sourceRange, type, viewer);
    IInvocationContext context = getContext(sourceRange, method, methodDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(methodDecl, context);
    assertEquals("2 proposal expected", 4, proposals.size());
    assertTrue("AddPathVariableCompletionProposal expected",
        proposals.get(0) instanceof AddPathVariableCompletionProposal);
View Full Code Here

Examples of org.eclipse.jdt.ui.text.java.IInvocationContext

  public void testTypeNoAnnotation() throws JavaModelException {
    IType t = type.getType("NoAnnotation");
    ISourceRange sourceRange = t.getSourceRange();
    TypeDeclaration typeDecl = (TypeDeclaration) getASTNode(sourceRange, t, viewer);
    IInvocationContext context = getContext(sourceRange, t, typeDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(typeDecl.getName(), context);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

Examples of org.eclipse.jdt.ui.text.java.IInvocationContext

  public void testTypeNoVariable() throws JavaModelException {
    IType t = type.getType("NoVariable");
    ISourceRange sourceRange = t.getSourceRange();
    TypeDeclaration typeDecl = (TypeDeclaration) getASTNode(sourceRange, t, viewer);
    IInvocationContext context = getContext(sourceRange, t, typeDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(typeDecl.getName(), context);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

Examples of org.eclipse.jdt.ui.text.java.IInvocationContext

  public void testType1VariableWithPathVariable() throws JavaModelException {
    IType t = type.getType("VariableWithPathVariable");
    ISourceRange sourceRange = t.getSourceRange();
    TypeDeclaration typeDecl = (TypeDeclaration) getASTNode(sourceRange, t, viewer);
    IInvocationContext context = getContext(sourceRange, t, typeDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(typeDecl.getName(), context);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

Examples of org.eclipse.jdt.ui.text.java.IInvocationContext

  public void testType1VariableWithNoPathVariable() throws JavaModelException {
    IType t = type.getType("VariableNoPathVariable");
    ISourceRange sourceRange = t.getSourceRange();
    TypeDeclaration typeDecl = (TypeDeclaration) getASTNode(sourceRange, t, viewer);
    IInvocationContext context = getContext(sourceRange, t, typeDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(typeDecl.getName(), context);
    assertEquals("1 proposal expected", 1, proposals.size());
    assertTrue("AddPathVariableCompletionProposal expected",
        proposals.get(0) instanceof AddPathVariableCompletionProposal);
View Full Code Here

Examples of org.eclipse.jdt.ui.text.java.IInvocationContext

  public void testType1VariableWithNoPathVariables() throws JavaModelException {
    IType t = type.getType("VariableNoPathVariables");
    ISourceRange sourceRange = t.getSourceRange();
    TypeDeclaration typeDecl = (TypeDeclaration) getASTNode(sourceRange, t, viewer);
    IInvocationContext context = getContext(sourceRange, t, typeDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(typeDecl.getName(), context);
    assertEquals("1 proposal expected", 2, proposals.size());
    assertTrue("AddPathVariableCompletionProposal expected",
        proposals.get(0) instanceof AddPathVariableCompletionProposal);
View Full Code Here

Examples of org.eclipse.jdt.ui.text.java.IInvocationContext

  public void testTypeVariableWithRegexPathVariable() throws JavaModelException {
    IType t = type.getType("VariableWithRegexPathVariable");
    ISourceRange sourceRange = t.getSourceRange();
    TypeDeclaration typeDecl = (TypeDeclaration) getASTNode(sourceRange, t, viewer);
    IInvocationContext context = getContext(sourceRange, t, typeDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(typeDecl.getName(), context);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

Examples of org.eclipse.jdt.ui.text.java.IInvocationContext

  // expects warning but no AddPathVariableCompletionProposal
  public void testType1VariableWithWrongRegexPathVariables() throws JavaModelException {
    IType t = type.getType("VariableWithWrongRegexPathVariable");
    ISourceRange sourceRange = t.getSourceRange();
    TypeDeclaration typeDecl = (TypeDeclaration) getASTNode(sourceRange, t, viewer);
    IInvocationContext context = getContext(sourceRange, t, typeDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(typeDecl.getName(), context);
    assertEquals("1 proposal expected", 0, proposals.size());
  }
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.