Examples of IInvocationContext


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

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

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

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

  public void testMethodNoAnnotation() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("noAnnotation", new String[] { "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);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

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

  public void testMethodNoVariableNoPathVariable() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("noVariableNoPathVariable", new String[] { "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);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

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

  public void testMethodNoVariablePathVariable() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("noVariablePathVariable", new String[] { "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);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

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

  public void testMethod1VariableWithPathVariable() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("variablePathVariable", new String[] { "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);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

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

  public void testMethod1VariableWithPathVariableRegEx() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("variablePathVariableRegEx", new String[] { "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);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

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

  public void testMethod1VariableNoPathVariable() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("variableNoPathVariable", new String[] { "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("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 testMethod1VariableNoPathVariableRegEx() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("variableNoPathVariableRegEx", new String[] { "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("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 testMethod2VariablesWithPathVariables() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("variablesPathVariables", 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);
    assertTrue("No proposals expected", proposals.isEmpty());
  }
View Full Code Here

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

  public void testMethod2Variables1PathVariable() throws JavaModelException {
    IMethod method = type.getType("NoAnnotation").getMethod("variablesPathVariable", 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("1 proposal expected", 2, proposals.size());
    assertTrue("AddPathVariableCompletionProposal expected",
        proposals.get(0) instanceof AddPathVariableCompletionProposal);
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.