Package org.springframework.ide.eclipse.beans.ui.editor.contentassist

Examples of org.springframework.ide.eclipse.beans.ui.editor.contentassist.IContentAssistCalculator


            | FlagsMethodFilter.NOT_CONSTRUCTOR
            | FlagsMethodFilter.PUBLIC);
      }
 

      IContentAssistCalculator calculator = new MethodContentAssistCalculator(filter) {

        @Override
        protected IType calculateType(IContentAssistContext context) {
          return JdtUtils.getJavaType(file.getProject(), className);
        }
      };
     
      IContentAssistProposalRecorder recorder = new DefaultContentAssistProposalRecorder(contentAssistRequest);
      IContentAssistContext context = new DefaultContentAssistContext(contentAssistRequest, "xyz", //FIXME
          prefix);         
     
      calculator.computeProposals(context, recorder); //request, prefix, null, null, null);
    }
  }
View Full Code Here


*/
public class JeeContentAssistProcessor extends NamespaceContentAssistProcessorSupport {

  @Override
  public void init() {
    IContentAssistCalculator calculator = new ClassContentAssistCalculator(true);
    registerContentAssistCalculator("jndi-lookup", "expected-type", calculator);
    registerContentAssistCalculator("jndi-lookup", "proxy-interface", calculator);
    registerContentAssistCalculator("remote-slsb", "home-interface", calculator);
    registerContentAssistCalculator("remote-slsb", "business-interface", calculator);
    registerContentAssistCalculator("local-slsb", "home-interface", calculator);
View Full Code Here

*/
public class JmsContentAssistProcessor extends NamespaceContentAssistProcessorSupport {

  @Override
  public void init() {
    IContentAssistCalculator beanRef = new BeanReferenceContentAssistCalculator(true);
    registerContentAssistCalculator("listener-container", "connection-factory", beanRef);
    registerContentAssistCalculator("listener-container", "task-executor", beanRef);
    registerContentAssistCalculator("listener-container", "destination-resolver", beanRef);
    registerContentAssistCalculator("listener-container", "message-converter", beanRef);
    registerContentAssistCalculator("listener-container", "transaction-manager", beanRef);
View Full Code Here

public class ContextContentAssistProcessor extends
    NamespaceContentAssistProcessorSupport {

  @Override
  public void init() {
    IContentAssistCalculator beanRef = new BeanReferenceContentAssistCalculator(true);
    registerContentAssistCalculator("component-scan", "name-generator",  beanRef);
    registerContentAssistCalculator("component-scan", "scope-resolver", beanRef);

    registerContentAssistCalculator("load-time-weaver", "weaver-class",
        new ClassHierachyContentAssistCalculator("org.springframework.instrument.classloading.LoadTimeWeaver"));
View Full Code Here

public class LangContentAssistProcessor extends
    NamespaceContentAssistProcessorSupport {

  @Override
  public void init() {
    IContentAssistCalculator calculator = new ClassContentAssistCalculator(
        true);
    registerContentAssistCalculator("jruby", "script-interfaces",
        calculator);
    registerContentAssistCalculator("bsh", "script-interfaces", calculator);
    registerContentAssistCalculator("groovy", "customizer-ref",
View Full Code Here

    else {
      filter = new FlagsMethodFilter(FlagsMethodFilter.NOT_VOID
          | FlagsMethodFilter.NOT_INTERFACE | FlagsMethodFilter.NOT_CONSTRUCTOR);
    }

    IContentAssistCalculator calculator = new MethodContentAssistCalculator(filter) {
     
      @Override
      public void computeProposals(IContentAssistContext context,
          IContentAssistProposalRecorder recorder) {
        super.computeProposals(context, recorder);
       
        IType type = calculateType(context);
        try {
          // Add special valueOf methods for Enum types
          if (type != null && type.isEnum()) {
            IFile contextFile = context.getFile();
            if (contextFile != null && contextFile.exists()) {
              IType enumType = JdtUtils.getJavaType(context.getFile().getProject(), Enum.class.getName());
              Set<String> proposedMethods = new HashSet<String>();
              for (IMethod method : Introspector.findAllMethods(enumType, context
                  .getMatchString(), filter)) {
                if (!proposedMethods.contains(method.getElementName())) {
                  proposedMethods.add(method.getElementName());
                  createMethodProposal(recorder, method);
                }
              }
            }
          }
        }
        catch (JavaModelException e) {
        }
      }

      @Override
      protected IType calculateType(IContentAssistContext context) {
        if (file != null && file.exists()) {
          return JdtUtils.getJavaType(file.getProject(), factoryClassName);
        }
        return null;
      }
    };

    calculator.computeProposals(context, recorder);
  }
View Full Code Here

    }

    // TODO: define a context and recorder that don't require a request.
    IContentAssistContext context = createContentAssistContext(contents);
    IContentAssistProposalRecorder recorder = createContentAssistRecorder();
    IContentAssistCalculator calc = createContentAssistCalculator();
    calc.computeProposals(context, recorder);

    ArrayList<IContentProposal> proposals = new ArrayList<IContentProposal>();
    ICompletionProposal[] results = request.getCompletionProposals();

    if (results != null && results.length > 0) {
View Full Code Here

* @since 2.2.2
*/
public class BatchContentAssistProcessor extends NamespaceContentAssistProcessorSupport {
 
  public void init() {
    IContentAssistCalculator stepRef = new StepReferenceContentAssistCalculator();
    registerContentAssistCalculator("next", "to", stepRef);
    registerContentAssistCalculator("stop", "restart", stepRef);
    registerContentAssistCalculator("split", "next", stepRef);
    registerContentAssistCalculator("step", "next", stepRef);
   
    IContentAssistCalculator beanRef = new BeanReferenceContentAssistCalculator();
    registerContentAssistCalculator("job", "parent", beanRef);
    registerContentAssistCalculator("step", "parent", beanRef);
    registerContentAssistCalculator("chunk", "processor", beanRef);
    registerContentAssistCalculator("chunk", "reader", beanRef);
    registerContentAssistCalculator("chunk", "writer", beanRef);
   
    IContentAssistCalculator classRef = new ClassContentAssistCalculator();
    registerContentAssistCalculator("listener", "class", classRef);
    registerContentAssistCalculator("job-listener", "class", classRef);
    registerContentAssistCalculator("step-listener", "class", classRef);
  }
View Full Code Here

   * @see org.springframework.ide.eclipse.beans.ui.editor.contentassist.AbstractContentAssistProcessor#init()
   */
  @Override
  public void init() {

    IContentAssistCalculator calculator = new PackageContentAssistCalculator();
    IContentAssistCalculator referenceLocator = new BeanReferenceContentAssistCalculator();

    registerContentAssistCalculator("base-package", calculator);
    registerContentAssistCalculator("auditing", "auditor-aware-ref", referenceLocator);
    registerContentAssistCalculator("repository", "custom-impl-ref", referenceLocator);
  }
View Full Code Here

* @since 2.0
*/
public class AopContentAssistProcessor extends NamespaceContentAssistProcessorSupport {

  public void init() {
    IContentAssistCalculator beanRef = new BeanReferenceContentAssistCalculator();
    registerContentAssistCalculator("aspect", "ref", beanRef);
    registerContentAssistCalculator("advisor", "advice-ref", beanRef);
    registerContentAssistCalculator("delegate-ref", beanRef);
    registerContentAssistCalculator("include", "name", beanRef);
    registerContentAssistCalculator("implement-interface", new ClassContentAssistCalculator(true));
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.beans.ui.editor.contentassist.IContentAssistCalculator

Copyright © 2018 www.massapicom. 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.