Package org.eclipse.jface.text.contentassist

Examples of org.eclipse.jface.text.contentassist.IContextInformation


                if (type == IToken.TYPE_PARAM || type == IToken.TYPE_LOCAL
                        || type == IToken.TYPE_OBJECT_FOUND_INTERFACE) {
                    priority = IPyCompletionProposal.PRIORITY_LOCALS;
                }

                IContextInformation pyContextInformation = null;
                if (args.length() > 2) {
                    int contextInformationOffset;
                    if (forcedContextInformationOffset < 0) {
                        contextInformationOffset = replacementOffset + name.length() + notInCalltip;
                    } else {
View Full Code Here


        int cursorPosition = doc.getLength();
        int replacementLength = 0;
        String realImportRep = "from XXX import YYY";
        int priority = 0;
        String additionalProposalInfo = null;
        IContextInformation contextInformation = null;
        String displayString = "Import YYY (from XXX)";
        Image image = null;

        CtxInsensitiveImportComplProposal prop = new CtxInsensitiveImportComplProposal(replacementString,
                replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation,
View Full Code Here

        int cursorPosition = doc.getLength();
        int replacementLength = 0;
        String realImportRep = "from __future__ import with_statement";
        int priority = 0;
        String additionalProposalInfo = null;
        IContextInformation contextInformation = null;
        String displayString = "Import with_statement (from __future__)";
        Image image = null;

        CtxInsensitiveImportComplProposal prop = new CtxInsensitiveImportComplProposal(replacementString,
                replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation,
View Full Code Here

      fContextSelectorTable.setRedraw(false);
      fContextSelectorTable.removeAll();

      TableItem item;
      IContextInformation t;
      for (int i= 0; i < contexts.length; i++) {
        t= contexts[i];
        item= new TableItem(fContextSelectorTable, SWT.NULL);
        if (t.getImage() != null)
          item.setImage(t.getImage());
        item.setText(t.getContextDisplayString());
      }

      fContextSelectorTable.select(0);
      fContextSelectorTable.setRedraw(true);
    }
View Full Code Here

      if (selection != null) {
        fViewer.setSelectedRange(selection.x, selection.y);
        fViewer.revealRange(selection.x, selection.y);
      }

      IContextInformation info= p.getContextInformation();
      if (info != null) {

        int position;
        if (p instanceof ICompletionProposalExtension) {
          ICompletionProposalExtension e= (ICompletionProposalExtension) p;
View Full Code Here

       
        ////////////////////////////////////////////////////////////////
        //TODO figure out why this has to have 2 - it wont show otherwise
        //IContextInformation[] result = new IContextInformation[st.countTokens() + 1];
        //IContextInformation result[] = new IContextInformation[2];
        IContextInformation result[] = new IContextInformation[fst.size()+1];
       
        Iterator i = fst.iterator();
        int x = 0;
        while(i.hasNext())
        {
View Full Code Here

      if (codeContext != null) {

        List<Node> units = codeContext.getCompletionsForString(line, prefix, linenumber);

        for (Node unit : units) {
          IContextInformation info = new ContextInformation(unit.getDocumentation(),
              unit.getDocumentation());

          int prefix_len = prefix.lastIndexOf('.');
          if (unit.getInsertionText() != null) {
            int len = unit.getInsertionText().length();
            if (len > 0) {
              results.add(new CompletionProposal(unit.getInsertionText(), offset, 0,
                  unit.getInsertionText().length() - 1, getImage(unit), unit.getName(), info,
                  unit.getDocumentation()));
            }
          }
        }
      } else {
        // The following is a simple place holder for a more complex
        // completion
        Keywords[] values = Keywords.values();
        for (int i = 0; i < values.length; i++) {
          String keyword = values[i].getValue();
          if (keyword.startsWith(prefix)) {
            IContextInformation info = new ContextInformation(keyword, "XXX");
            //MessageFormat.format(JavaEditorMessages.getString("CompletionProcessor.Proposal.ContextInfo.pattern"), new Object[] { fgProposals[i] })); //$NON-NLS-1$
            results.add(new CompletionProposal(keyword.substring(prefix.length(), keyword.length())
                + " ", offset, 0, keyword.length() - prefix.length() + 1, go, keyword, info,
                values[i].getDescription()));
          }
View Full Code Here

     
      String spec = completionEntry.substring(secondComma + 2);
     
      String descriptiveString = identifier + " : " + spec;
      String description = codeContext.getDescriptionForName(identifier).trim();
      IContextInformation info = new ContextInformation(description, description);
      //MessageFormat.format(JavaEditorMessages.getString("CompletionProcessor.Proposal.ContextInfo.pattern"), new Object[] { fgProposals[i] })); //$NON-NLS-1$
     
      Image image = GoPluginImages.SOURCE_OTHER.getImage();
      String substr = identifier.substring(prefix.length());
      int replacementLength = identifier.length() - prefix.length();
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.contentassist.IContextInformation

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.