Examples of IInvocationContext


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

  public void testMethodWith2ParamsOneQualifier() throws JavaModelException {
    IMethod method = type.getMethod("testMethod5", new String[] { "QTestClass;", "QTestClass;" });
    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("AddQualiferCompletionProposal expected",
        proposals.get(0) instanceof AddQualiferToMethodParamCompletionProposal);
View Full Code Here

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

  public void testMethodWith2ParamsOneUnmatchedBeans() throws JavaModelException {
    IMethod method = type.getMethod("testMethod6", new String[] { "QTestClass;", "QQualifierTest;" });
    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("AddQualiferCompletionProposal expected",
        proposals.get(0) instanceof AddQualiferToMethodParamCompletionProposal);
View Full Code Here

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

  public void testConstructorWith1Param() throws JavaModelException {
    IMethod constructor = getConstructor(type, 1);
    ISourceRange sourceRange = constructor.getSourceRange();
    MethodDeclaration methodDecl = (MethodDeclaration) getASTNode(sourceRange, type, viewer);
    IInvocationContext context = getContext(sourceRange, constructor, methodDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(methodDecl, context);
    assertTrue("2 proposals are expected", proposals.size() == 2);
    assertTrue("AddAutowireCompletionProposal expected", proposals.get(0) instanceof AddAutowireCompletionProposal);
    assertTrue("AddAutowireCompletionProposal expected", proposals.get(1) instanceof AddAutowireCompletionProposal);
View Full Code Here

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

  public void testConstructorWithAutowired() throws JavaModelException {
    IMethod constructor = getConstructor(constructorTestType, 1);
    ISourceRange sourceRange = constructor.getSourceRange();
    MethodDeclaration methodDecl = (MethodDeclaration) getASTNode(sourceRange, constructorTestType,
        constructorTestViewer);
    IInvocationContext context = getContext(sourceRange, constructor, 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 testConstructorWithOtherConstructorWithAutowired() throws JavaModelException {
    IMethod constructor = getConstructor(constructorTestType, 2);
    ISourceRange sourceRange = constructor.getSourceRange();
    MethodDeclaration methodDecl = (MethodDeclaration) getASTNode(sourceRange, constructorTestType,
        constructorTestViewer);
    IInvocationContext context = getContext(sourceRange, constructor, 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 testConstructorWithNoParam() throws JavaModelException {
    IMethod constructor = getConstructor(type, 0);
    ISourceRange sourceRange = constructor.getSourceRange();
    MethodDeclaration methodDecl = (MethodDeclaration) getASTNode(sourceRange, type, viewer);
    IInvocationContext context = getContext(sourceRange, constructor, 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 testField() throws JavaModelException {
    IField field = type.getField("testBean1");
    ISourceRange sourceRange = field.getSourceRange();
    FieldDeclaration fieldDecl = (FieldDeclaration) getASTNode(sourceRange, type, viewer);
    IInvocationContext context = getContext(sourceRange, field, fieldDecl);

    List<IJavaCompletionProposal> proposals = processor.getAssists(fieldDecl, context);
    assertTrue("2 proposals are expected", proposals.size() == 2);
    assertTrue("AddAutowireCompletionProposal expected", proposals.get(0) instanceof AddAutowireCompletionProposal);
    assertTrue("AddAutowireCompletionProposal expected", proposals.get(1) instanceof AddAutowireCompletionProposal);
View Full Code Here

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

  public void testFieldWithAutowired() throws JavaModelException {
    IField field = type.getField("testBean2");
    ISourceRange sourceRange = field.getSourceRange();
    FieldDeclaration fieldDecl = (FieldDeclaration) getASTNode(sourceRange, type, viewer);
    IInvocationContext context = getContext(sourceRange, field, fieldDecl);

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

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

  public void testMethodWith1Param() throws JavaModelException {
    IMethod method = type.getMethod("testMethod1", new String[] { "QTestClass;" });
    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("2 proposals are expected", proposals.size() == 2);
    assertTrue("AddAutowireCompletionProposal expected", proposals.get(0) instanceof AddAutowireCompletionProposal);
    assertTrue("AddAutowireCompletionProposal expected", proposals.get(1) instanceof AddAutowireCompletionProposal);
View Full Code Here

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

  public void testMethodWith1ParamWithAutowired() throws JavaModelException {
    IMethod method = type.getMethod("testMethod2", new String[] { "QTestClass;" });
    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
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.