当前位置: 首页>>代码示例>>Java>>正文


Java LookupElementPresentation.setTypeGrayed方法代码示例

本文整理汇总了Java中com.intellij.codeInsight.lookup.LookupElementPresentation.setTypeGrayed方法的典型用法代码示例。如果您正苦于以下问题:Java LookupElementPresentation.setTypeGrayed方法的具体用法?Java LookupElementPresentation.setTypeGrayed怎么用?Java LookupElementPresentation.setTypeGrayed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.codeInsight.lookup.LookupElementPresentation的用法示例。


在下文中一共展示了LookupElementPresentation.setTypeGrayed方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
    super.renderElement(presentation);

    if (myMessage.getKey() instanceof StringLiteralExpression) {
        presentation.setItemText(((StringLiteralExpression) myMessage.getKey()).getContents());
        presentation.setIcon(myMessage.getKey().getIcon(0));
    }

    PhpExpression value = (PhpExpression) myMessage.getValue();
    if (value != null) {
        String text = Util.PhpExpressionValue(value);

        if (!text.isEmpty()) {
            presentation.setTailText(" = " + text, true);
        }

        presentation.setTypeText(value.getType().toString());
        presentation.setTypeGrayed(true);
    }
}
 
开发者ID:nvlad,项目名称:yii2support,代码行数:22,代码来源:MessageLookupElement.java

示例2: decorateLookupElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
public static void decorateLookupElement(@NotNull LookupElementPresentation lookupElement, @NotNull JsonRawLookupElement jsonLookup) {

        if(jsonLookup.getTailText() != null) {
            lookupElement.setTailText(jsonLookup.getTailText(), true);
        }

        if(jsonLookup.getTypeText() != null) {
            lookupElement.setTypeText(jsonLookup.getTypeText());
            lookupElement.setTypeGrayed(true);
        }

        String iconString = jsonLookup.getIcon();
        if(iconString != null) {
            Icon icon = getLookupIconOnString(iconString);
            if(icon != null) {
                lookupElement.setIcon(icon);
            }
        }

    }
 
开发者ID:Haehnchen,项目名称:idea-php-toolbox,代码行数:21,代码来源:JsonParseUtil.java

示例3: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
public void renderElement(LookupElementPresentation presentation) {

        if(this.useClassNameAsLookupString) {
            presentation.setItemText(className.getPresentableFQN());
            presentation.setTypeText(getLookupString());
        } else {
            presentation.setItemText(getLookupString());
            presentation.setTypeText(className.getPresentableFQN());
        }

        presentation.setTypeGrayed(true);
        if(isWeak) {
            // @TODO: remove weak
            presentation.setIcon(getWeakIcon());
        } else {
            presentation.setIcon(getIcon());
        }


    }
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:21,代码来源:DoctrineEntityLookupElement.java

示例4: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
    super.renderElement(presentation);

    presentation.setItemTextBold(withBoldness);
    presentation.setIcon(Symfony2Icons.DOCTRINE);
    presentation.setTypeGrayed(true);

    if(this.doctrineModelField.getTypeName() != null) {
        presentation.setTypeText(this.doctrineModelField.getTypeName());
    }

    if(this.doctrineModelField.getRelationType() != null) {
        presentation.setTailText(String.format("(%s)", this.doctrineModelField.getRelationType()), true);
    }

    if(this.doctrineModelField.getRelation() != null) {
        presentation.setTypeText(this.doctrineModelField.getRelation());
        presentation.setIcon(PhpIcons.CLASS_ICON);
    }

}
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:23,代码来源:DoctrineModelFieldLookupElement.java

示例5: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
public void renderElement(LookupElementPresentation presentation) {
    presentation.setItemText(containerParameter.getName());

    String value = containerParameter.getValue();
    if(value != null && StringUtils.isNotBlank(value)) {
        presentation.setTypeText(value);
    }

    presentation.setTypeGrayed(true);
    presentation.setIcon(Symfony2Icons.PARAMETER);

    if(this.containerParameter.isWeak()) {
        presentation.setIcon(Symfony2Icons.PARAMETER_OPACITY);
    }

}
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:17,代码来源:ParameterLookupElement.java

示例6: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
    presentation.setIcon(myFile.getIcon(0));
    presentation.setItemText(myName);
    presentation.setItemTextBold(true);
    if (myTail != null) {
        presentation.setTailText(myTail, true);
    }
    presentation.setTypeText("View");
    presentation.setTypeGrayed(true);
}
 
开发者ID:nvlad,项目名称:yii2support,代码行数:12,代码来源:ViewLookupElement.java

示例7: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
    presentation.setItemText(getLookupString());
    presentation.setIcon(TYPO3CMSIcons.ROUTE_ICON);
    presentation.setTypeText(route.getController());
    presentation.setTypeGrayed(true);
}
 
开发者ID:cedricziel,项目名称:idea-php-typo3-plugin,代码行数:8,代码来源:RouteLookupElement.java

示例8: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
    presentation.setItemText(translation.getIndex() + "  ");
    presentation.setTailText(getLookupString(), true);
    presentation.setIcon(TYPO3CMSIcons.TYPO3_ICON);
    presentation.setTypeText("EXT:" + translation.getExtension());
    presentation.setTypeGrayed(true);
}
 
开发者ID:cedricziel,项目名称:idea-php-typo3-plugin,代码行数:9,代码来源:TranslationLookupElement.java

示例9: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
    presentation.setItemText(icon.getName());
    presentation.setIcon(iconFromIconInterface(icon));
    presentation.setTypeText(icon.getExtensionKey());
    presentation.setTypeGrayed(true);
}
 
开发者ID:cedricziel,项目名称:idea-php-typo3-plugin,代码行数:8,代码来源:IconLookupElement.java

示例10: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(final LookupElementPresentation presentation) {
    final Parameter[] methodParameters = method.getParameters();
    final Parameter[] methodParametersWithoutBuilder = (methodParameters.length >= 1)
                                                       ? Arrays.copyOfRange(methodParameters, 1, methodParameters.length)
                                                       : methodParameters;

    presentation.setItemText(lookupString);
    presentation.setIcon(PhpIcons.METHOD);
    presentation.setTypeText(LaravelClasses.ELOQUENT_BUILDER.toString().substring(1));
    presentation.setTypeGrayed(false);
    presentation.appendTailText(PhpPresentationUtil.formatParameters(null, methodParametersWithoutBuilder).toString(), true);
}
 
开发者ID:rentalhost,项目名称:laravel-insight,代码行数:14,代码来源:ScopeCompletionContributor.java

示例11: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
  super.renderElement(presentation);
  if (sudden) {
    presentation.setTailText(" " + UIUtil.rightArrow() + " " + myTemplate.getExample());
  }
  else {
    presentation.setTypeText(myTemplate.getExample());
    presentation.setTypeGrayed(true);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:PostfixTemplateLookupElement.java

示例12: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
public void renderElement(LookupElementPresentation presentation) {
    presentation.setItemText(title);
    ImageIcon icon = new ImageIcon(this.getClass().getResource("/com/yiistorm/images/yii.png"));
    presentation.setIcon(icon);
    presentation.setTypeText(createTitle);
    presentation.setTypeGrayed(false);
}
 
开发者ID:cmazx,项目名称:yiistorm,代码行数:8,代码来源:ExistFileLookupElement.java

示例13: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
public void renderElement(LookupElementPresentation presentation) {
    presentation.setItemText(title);


    presentation.setIcon(icon);
    presentation.setTypeText(langTitle);
    presentation.setTypeGrayed(false);
}
 
开发者ID:cmazx,项目名称:yiistorm,代码行数:9,代码来源:MessageLookupElement.java

示例14: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
public void renderElement(LookupElementPresentation presentation) {
    presentation.setItemText(getLookupString());
    presentation.setTypeGrayed(true);

    String className = getClassName(containerService);
    if(className != null) {
        presentation.setTypeText(StringUtils.strip(className, "\\"));
    }

    // private or non container services
    if(className == null || containerService.isWeak()) {
        presentation.setIcon(Symfony2Icons.SERVICE_OPACITY);
    } else {
        presentation.setIcon(Symfony2Icons.SERVICE);
    }

    if(this.containerService.isPrivate()) {
        presentation.setIcon(Symfony2Icons.SERVICE_PRIVATE_OPACITY);
    }

    presentation.setItemTextBold(this.boldText);
    if(this.boldText) {
        presentation.setTypeGrayed(false);
        presentation.setItemTextUnderlined(true);
    }

    if(containerService.getService() != null) {
        presentation.setStrikeout(containerService.getService().isDeprecated());
    }
}
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:31,代码来源:ServiceStringLookupElement.java

示例15: renderElement

import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
    presentation.setItemText(phpClass.getName());
    presentation.setTypeText(phpClass.getPresentableFQN());
    presentation.setTypeGrayed(true);
    super.renderElement(presentation);
}
 
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:8,代码来源:ClassConstantLookupElementAbstract.java


注:本文中的com.intellij.codeInsight.lookup.LookupElementPresentation.setTypeGrayed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。