Package org.eclipse.jdt.internal.ui.text.java

Examples of org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal


      StyledString displayName = new StyledString("it : " + paramType.getName());
      displayName.append(" - Access the mocked object 'it' of type '"
          + paramType.getName() +"'", QUALIFIER_STYLER);

      IJavaCompletionProposal proposal
      = new JavaCompletionProposal(relpacement, context.getInvocationOffset()-prefix.length(), prefix.length(),
          image, displayName, MockMethodCompletionProposal.MAX_RELEVANCE);
      list.add(proposal );
    }
  }
View Full Code Here


    private static void processesJavaCompletionProposal(boolean settersOnly,
                                                        final Collection set,
                                                        Object o) {
        if ( settersOnly ) {
            JavaCompletionProposal jcp = (JavaCompletionProposal) o;
            //TODO: FIXME: this is very fragile as it uses reflection to access the private completion field.
            //Yet this is needed to do mvel filtering based on the method signtures, IF we use the richer JDT completion
            //                    Object field = ReflectionUtils.getField( o,
            //                                                             "fProposal" );
            IJavaElement javaElement = jcp.getJavaElement();
            if ( javaElement.getElementType() == IJavaElement.FIELD ) {
                set.add( o );

            }
        } else {
View Full Code Here

    private static void processesJavaCompletionProposal(boolean settersOnly,
                                                        final Collection<ICompletionProposal> set,
                                                        ICompletionProposal o) {
        if ( settersOnly ) {
            JavaCompletionProposal jcp = (JavaCompletionProposal) o;
            //TODO: FIXME: this is very fragile as it uses reflection to access the private completion field.
            //Yet this is needed to do mvel filtering based on the method signtures, IF we use the richer JDT completion
            //                    Object field = ReflectionUtils.getField( o,
            //                                                             "fProposal" );
            IJavaElement javaElement = jcp.getJavaElement();
            if ( javaElement.getElementType() == IJavaElement.FIELD ) {
                set.add( o );

            }
        } else {
View Full Code Here

    private static void processesJavaCompletionProposal(boolean settersOnly,
                                                        final Collection set,
                                                        Object o) {
        if ( settersOnly ) {
            JavaCompletionProposal jcp = (JavaCompletionProposal) o;
            //TODO: FIXME: this is very fragile as it uses reflection to access the private completion field.
            //Yet this is needed to do mvel filtering based on the method signtures, IF we use the richer JDT completion
            //                    Object field = ReflectionUtils.getField( o,
            //                                                             "fProposal" );
            IJavaElement javaElement = jcp.getJavaElement();
            if ( javaElement.getElementType() == IJavaElement.FIELD ) {
                set.add( o );

            }
        } else {
View Full Code Here

          String replaceString = null;
          if(proposals[j] instanceof LazyJavaTypeCompletionProposal){
            LazyJavaTypeCompletionProposal p = (LazyJavaTypeCompletionProposal)proposals[j];
            replaceString = p.getReplacementString();
          } else if(proposals[j] instanceof JavaCompletionProposal){
            JavaCompletionProposal p = (JavaCompletionProposal)proposals[j];
            replaceString = p.getReplacementString();
          }
          if(replaceString!=null && replaceString.startsWith(contents)){
            result.add(new FieldAssistUtils.ContentProposalImpl(replaceString, position));
          }
        }
View Full Code Here

    private static void processesJavaCompletionProposal(boolean settersOnly,
                                                        final Collection set,
                                                        Object o) {
        if ( settersOnly ) {
            JavaCompletionProposal jcp = (JavaCompletionProposal) o;
            //TODO: FIXME: this is very fragile as it uses reflection to access the private completion field.
            //Yet this is needed to do mvel filtering based on the method signtures, IF we use the richer JDT completion
            //                    Object field = ReflectionUtils.getField( o,
            //                                                             "fProposal" );
            IJavaElement javaElement = jcp.getJavaElement();
            if ( javaElement.getElementType() == IJavaElement.FIELD ) {
                set.add( o );

            }
        } else {
View Full Code Here

          String replaceString = null;
          if(proposals[j] instanceof LazyJavaTypeCompletionProposal){
            LazyJavaTypeCompletionProposal p = (LazyJavaTypeCompletionProposal)proposals[j];
            replaceString = p.getReplacementString();
          } else if(proposals[j] instanceof JavaCompletionProposal){
            JavaCompletionProposal p = (JavaCompletionProposal)proposals[j];
            replaceString = p.getReplacementString();
          }
          if(replaceString!=null && replaceString.startsWith(contents)){
            result.add(new FieldAssistUtils.ContentProposalImpl(replaceString, position));
          }
        }
View Full Code Here

          String replaceString = null;
          if(proposals[j] instanceof LazyJavaTypeCompletionProposal){
            LazyJavaTypeCompletionProposal p = (LazyJavaTypeCompletionProposal)proposals[j];
            replaceString = p.getReplacementString();
          } else if(proposals[j] instanceof JavaCompletionProposal){
            JavaCompletionProposal p = (JavaCompletionProposal)proposals[j];
            replaceString = p.getReplacementString();
          }
          if(replaceString!=null && replaceString.startsWith(contents)){
            result.add(new FieldAssistUtils.ContentProposalImpl(replaceString, position));
          }
        }
View Full Code Here

            LazyJavaTypeCompletionProposal p = (LazyJavaTypeCompletionProposal)proposals[j];
            if(p.getReplacementString().startsWith(value)){
              result.add(new JavaClassAssistInfo(p));
            }
          } else if(proposals[j] instanceof JavaCompletionProposal){
            JavaCompletionProposal p = (JavaCompletionProposal)proposals[j];
            if(p.getReplacementString().startsWith(value)){
              result.add(new JavaClassAssistInfo(p));
            }
          }
        }
      }
View Full Code Here

    private static void processesJavaCompletionProposal(boolean settersOnly,
                                                        final Collection set,
                                                        Object o) {
        if ( settersOnly ) {
            JavaCompletionProposal jcp = (JavaCompletionProposal) o;
            //TODO: FIXME: this is very fragile as it uses reflection to access the private completion field.
            //Yet this is needed to do mvel filtering based on the method signtures, IF we use the richer JDT completion
            //                    Object field = ReflectionUtils.getField( o,
            //                                                             "fProposal" );
            IJavaElement javaElement = jcp.getJavaElement();
            if ( javaElement.getElementType() == IJavaElement.FIELD ) {
                set.add( o );

            }
        } else {
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal

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.