Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.CompletionRequestor


        return list;
    }

    public static List<String> getAllClassesInPackage(String packageName, IJavaProject javaProject) {
        final List<String> list = new ArrayList<String>();
        CompletionRequestor requestor = new CompletionRequestor() {
            public void accept(org.eclipse.jdt.core.CompletionProposal proposal) {
                String className = new String(proposal.getCompletion());
                if (proposal.getKind() == org.eclipse.jdt.core.CompletionProposal.TYPE_REF) {
                    list.add(className);
                }
View Full Code Here


            IEditorInput input = getEditorInput();
            if (input instanceof IFileEditorInput) {
                IProject project = ((IFileEditorInput) input).getFile().getProject();
                IJavaProject javaProject = JavaCore.create(project);

                CompletionRequestor requestor = new CompletionRequestor() {
                    public void accept(org.eclipse.jdt.core.CompletionProposal proposal) {
                        String functionName = new String(proposal.getCompletion());
                        if (proposal.getKind() == org.eclipse.jdt.core.CompletionProposal.METHOD_REF) {
                            list.add(functionName.substring(0, functionName.length() - 2)); // remove the ()
                        }
View Full Code Here

        return list;
    }

    public static List<String> getAllClassesInPackage(String packageName, IJavaProject javaProject) {
        final List<String> list = new ArrayList<String>();
        CompletionRequestor requestor = new CompletionRequestor() {
            public void accept(org.eclipse.jdt.core.CompletionProposal proposal) {
                String className = new String(proposal.getCompletion());
                if (proposal.getKind() == org.eclipse.jdt.core.CompletionProposal.TYPE_REF) {
                    list.add(className);
                }
View Full Code Here

            IEditorInput input = getEditorInput();
            if (input instanceof IFileEditorInput) {
                IProject project = ((IFileEditorInput) input).getFile().getProject();
                IJavaProject javaProject = JavaCore.create(project);

                CompletionRequestor requestor = new CompletionRequestor() {
                    public void accept(org.eclipse.jdt.core.CompletionProposal proposal) {
                        String functionName = new String(proposal.getCompletion());
                        if (proposal.getKind() == org.eclipse.jdt.core.CompletionProposal.METHOD_REF) {
                            list.add(functionName.substring(0, functionName.length() - 2)); // remove the ()
                        }
View Full Code Here

        return list;
    }

    public static List<String> getAllClassesInPackage(String packageName, IJavaProject javaProject) {
        final List<String> list = new ArrayList<String>();
        CompletionRequestor requestor = new CompletionRequestor() {
            public void accept(org.eclipse.jdt.core.CompletionProposal proposal) {
                String className = new String(proposal.getCompletion());
                if (proposal.getKind() == org.eclipse.jdt.core.CompletionProposal.TYPE_REF) {
                    list.add(className);
                }
View Full Code Here

            IEditorInput input = getEditorInput();
            if (input instanceof IFileEditorInput) {
                IProject project = ((IFileEditorInput) input).getFile().getProject();
                IJavaProject javaProject = JavaCore.create(project);

                CompletionRequestor requestor = new CompletionRequestor() {
                    public void accept(org.eclipse.jdt.core.CompletionProposal proposal) {
                        String functionName = new String(proposal.getCompletion());
                        if (proposal.getKind() == org.eclipse.jdt.core.CompletionProposal.METHOD_REF) {
                            list.add(functionName.substring(0, functionName.length() - 2)); // remove the ()
                        }
View Full Code Here

/**
* Returns a completion requestor that wraps the given requestor and shift the results
* according to the start offset and line number offset of the code snippet in the generated compilation unit.
*/
public CompletionRequestor getCompletionRequestor(final CompletionRequestor originalRequestor) {
  return new CompletionRequestor() {
    public void accept(CompletionProposal proposal) {
      switch(proposal.getKind()) {
        case CompletionProposal.TYPE_REF:
          int flags = proposal.getFlags();
          if((flags & Flags.AccEnum) == 0 &&
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.CompletionRequestor

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.