本文整理汇总了Java中com.intellij.lang.parameterInfo.ParameterInfoUIContext类的典型用法代码示例。如果您正苦于以下问题:Java ParameterInfoUIContext类的具体用法?Java ParameterInfoUIContext怎么用?Java ParameterInfoUIContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParameterInfoUIContext类属于com.intellij.lang.parameterInfo包,在下文中一共展示了ParameterInfoUIContext类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: updateUI
import com.intellij.lang.parameterInfo.ParameterInfoUIContext; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public void updateUI(ItemToShow p, ParameterInfoUIContext context)
{
if(p == null)
{
context.setUIComponentEnabled(false);
return;
}
CSharpParametersInfo build = CSharpParametersInfo.build(p.myLikeMethod, p.myScope);
String text = build.getText();
TextRange parameterRange = build.getParameterRange(context.getCurrentParameterIndex());
context.setupUIComponentPresentation(text, parameterRange.getStartOffset(), parameterRange.getEndOffset(), !context.isUIComponentEnabled(), p.isObsolete(), false, context
.getDefaultParameterColor());
}
开发者ID:consulo,项目名称:consulo-csharp,代码行数:19,代码来源:CSharpParameterInfoHandler.java
示例2: updateUI
import com.intellij.lang.parameterInfo.ParameterInfoUIContext; //导入依赖的package包/类
@Override
public void updateUI(DotNetGenericParameterListOwner p, ParameterInfoUIContext context)
{
if(p == null)
{
context.setUIComponentEnabled(false);
return;
}
CSharpGenericParametersInfo build = CSharpGenericParametersInfo.build(p);
if(build == null)
{
context.setUIComponentEnabled(false);
return;
}
String text = build.getText();
TextRange parameterRange = build.getParameterRange(context.getCurrentParameterIndex());
context.setupUIComponentPresentation(text, parameterRange.getStartOffset(), parameterRange.getEndOffset(), !context.isUIComponentEnabled(),
false, false, context.getDefaultParameterColor());
}
开发者ID:consulo,项目名称:consulo-csharp,代码行数:23,代码来源:CSharpGenericParameterInfoHandler.java
示例3: updateUI
import com.intellij.lang.parameterInfo.ParameterInfoUIContext; //导入依赖的package包/类
@Override
public void updateUI(Object p, ParameterInfoUIContext context) {
if (p == null) {
context.setUIComponentEnabled(false);
return;
}
int index = context.getCurrentParameterIndex();
ParameterPresentation presentation = null;
if (p instanceof XQueryFunctionDecl) {
presentation = buildUserFunctionPresentation((XQueryFunctionDecl) p, index);
} else if (p instanceof BuiltInFunctionSignature) {
presentation = buildBuiltInFunctionPresentation((BuiltInFunctionSignature) p, index);
}
context.setupUIComponentPresentation(presentation.text, presentation.start, presentation.end,
presentation.disabled, false, true,
context.getDefaultParameterColor());
}
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:18,代码来源:XQueryParameterInfoHandler.java
示例4: updateUI
import com.intellij.lang.parameterInfo.ParameterInfoUIContext; //导入依赖的package包/类
@Override
public void updateUI(final JSFunction p, final ParameterInfoUIContext context)
{
final JSParameterList parameterList = p.getParameterList();
final JSParameter[] params = parameterList != null ? parameterList.getParameters() : new JSParameter[0];
final int currentParameterIndex = context.getCurrentParameterIndex() >= 0 ? context.getCurrentParameterIndex() : params.length;
final JSParameter parameter = currentParameterIndex < params.length ? params[currentParameterIndex] : null;
final SignatureInfo signatureInfo = buildSignature(params, false, currentParameterIndex);
final String name = signatureInfo.text;
final String currentParameterSignature = parameter != null ? getSignatureForParameter(parameter, false) : null;
int highlightStart = parameter != null ? signatureInfo.selectedParameterStart : 0;
int highlightEnd = parameter != null ? highlightStart + currentParameterSignature.length() : 0;
context.setupUIComponentPresentation(name, highlightStart, highlightEnd, false, false, false, context.getDefaultParameterColor());
}
开发者ID:consulo,项目名称:consulo-javascript,代码行数:17,代码来源:JSParameterInfoHandler.java
示例5: updateUI
import com.intellij.lang.parameterInfo.ParameterInfoUIContext; //导入依赖的package包/类
@Override
public void updateUI(final Object p, @NotNull final ParameterInfoUIContext context)
{
if(p instanceof CandidateInfo)
{
CandidateInfo info = (CandidateInfo) p;
PsiMethod method = (PsiMethod) info.getElement();
if(!method.isValid())
{
context.setUIComponentEnabled(false);
return;
}
updateMethodPresentation(method, getCandidateInfoSubstitutor(info), context);
}
else
{
updateMethodPresentation((PsiMethod) p, null, context);
}
}
开发者ID:consulo,项目名称:consulo-java,代码行数:21,代码来源:MethodParameterInfoHandler.java
示例6: updateUI
import com.intellij.lang.parameterInfo.ParameterInfoUIContext; //导入依赖的package包/类
public void updateUI(final VtlCallable callable, final ParameterInfoUIContext context) {
PsiElement list = context.getParameterOwner();
if (!list.isValid()) {
return;
}
final int index = context.getCurrentParameterIndex();
boolean applicable = isApplicable(callable, list, index);
int highlightStart = -1;
int highlightEnd = -1;
StringBuilder sb = new StringBuilder();
final VtlVariable[] variables = callable.getParameters();
boolean isMacro = callable instanceof VtlMacro;
String delimiter = isMacro ? " " : ", ";
for (int i = 0; i < variables.length; i++) {
if (i > 0) {
sb.append(delimiter);
}
if (i == index) {
highlightStart = sb.length();
}
VtlVariable variable = variables[i];
PsiType type = variable.getPsiType();
if (type != null) {
sb.append(type.getPresentableText()).append(" ");
}
if (isMacro) {
sb.append('$');
}
sb.append(variable.getName());
if (i == index) {
highlightEnd = sb.length();
}
}
if (variables.length == 0) {
sb.append(CodeInsightBundle.message("parameter.info.no.parameters"));
}
final boolean deprecated = callable.isDeprecated();
context.setupUIComponentPresentation(sb.toString(), highlightStart, highlightEnd, !applicable, deprecated, false, context.getDefaultParameterColor());
}
开发者ID:consulo,项目名称:consulo-apache-velocity,代码行数:45,代码来源:VtlParameterInfoHandler.java
注:本文中的com.intellij.lang.parameterInfo.ParameterInfoUIContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论