Package org.rstudio.studio.client.workbench.views.source.model

Examples of org.rstudio.studio.client.workbench.views.source.model.CppCompletion


        
         // build list of entries (filter on text already entered)
         JsArray<CppCompletion> filtered = JsArray.createArray().cast();
         for (int i = 0; i < completions_.length(); i++)
         {
            CppCompletion completion = completions_.get(i);
            String typedText = completion.getTypedText();
            if ((userTypedText.length() == 0) ||
                 typedText.startsWith(userTypedText))
            {
               // be more picky for member scope completions because clang
               // returns a bunch of noise like constructors, destructors,
               // compiler generated assignments, etc.
               if (completionPosition_.getScope() ==
                                 CompletionPosition.Scope.Member)
               {
                  if (completion.getType() == CppCompletion.VARIABLE ||
                      (completion.getType() == CppCompletion.FUNCTION &&
                       !typedText.startsWith("operator=")))
                  {
                     filtered.push(completion);
                  }
                
View Full Code Here


     
      // add items (remember first item for programmatic selection)
      MenuItem firstItem = null;
      for (int i = 0; i<completions.length(); i++)
      {
         final CppCompletion completion = completions.get(i);
        
         SafeHtmlBuilder sb = new SafeHtmlBuilder();
         SafeHtmlUtil.appendImage(sb,
                                  RES.styles().itemImage(),
                                  completion.getIcon());
         SafeHtmlUtil.appendSpan(sb,
                                 RES.styles().itemName(),
                                 completion.getTypedText());  
        
        
         MenuItem menuItem = new MenuItem(sb.toSafeHtml(),
               new ScheduledCommand() {
            @Override
View Full Code Here

               toolTip_.setVisible(false);
               return;
            }
           
            // screen no completion text
            CppCompletion completion = completions_.get(index);
            if (completion.getText() == null)
            {
               toolTip_.setVisible(false);
               return;
            }
            String text = completion.getText().get(0);
           
            // only do tooltips for functions and variables
            if (completion.getType() != CppCompletion.FUNCTION &&
                completion.getType() != CppCompletion.VARIABLE)
            {
               toolTip_.setVisible(false);
               return;
            }
           
View Full Code Here

TOP

Related Classes of org.rstudio.studio.client.workbench.views.source.model.CppCompletion

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.