本文整理汇总了Java中com.intellij.openapi.util.UserDataHolderBase.putUserData方法的典型用法代码示例。如果您正苦于以下问题:Java UserDataHolderBase.putUserData方法的具体用法?Java UserDataHolderBase.putUserData怎么用?Java UserDataHolderBase.putUserData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.util.UserDataHolderBase
的用法示例。
在下文中一共展示了UserDataHolderBase.putUserData方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doSelectElement
import com.intellij.openapi.util.UserDataHolderBase; //导入方法依赖的package包/类
@NotNull
@Override
@RequiredReadAction
public Collection<PsiElement> doSelectElement(@NotNull CSharpResolveContext context, boolean deep)
{
if(myNameWithAt.isEmpty())
{
return Collections.emptyList();
}
UserDataHolderBase options = new UserDataHolderBase();
options.putUserData(BaseDotNetNamespaceAsElement.FILTER, DotNetNamespaceAsElement.ChildrenFilter.ONLY_ELEMENTS);
if(myNameWithAt.charAt(0) == '@')
{
return context.findByName(myNameWithAt.substring(1, myNameWithAt.length()), deep, options);
}
else
{
Collection<PsiElement> withoutSuffix = context.findByName(myNameWithAt, deep, options);
Collection<PsiElement> array = ContainerUtil2.concat(withoutSuffix, context.findByName(myNameWithAt + AttributeSuffix, deep, options));
return ContainerUtil.findAll(array, element -> element instanceof CSharpTypeDeclaration && DotNetInheritUtil.isAttribute((DotNetTypeDeclaration) element));
}
}
示例2: computeChildren
import com.intellij.openapi.util.UserDataHolderBase; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void computeChildren(@NotNull UserDataHolderBase dataHolder,
@NotNull DotNetDebugContext debugContext,
@NotNull DotNetAbstractVariableValueNode parentNode,
@NotNull DotNetStackFrameProxy frameProxy,
@Nullable DotNetValueProxy oldValue,
@NotNull XCompositeNode node)
{
if(oldValue == null || !isMyValue(oldValue))
{
node.setErrorMessage("No value");
return;
}
T value = (T) oldValue;
final int length = getSize(value);
final int startIndex = ObjectUtil.notNull(dataHolder.getUserData(ourLastIndex), 0);
XValueChildrenList childrenList = new XValueChildrenList();
int max = Math.min(startIndex + XCompositeNode.MAX_CHILDREN_TO_SHOW, length);
for(int i = startIndex; i < max; i++)
{
childrenList.add(createChildValue(i, debugContext, frameProxy, value));
}
dataHolder.putUserData(ourLastIndex, max);
node.addChildren(childrenList, true);
if(length > max)
{
node.tooManyChildren(length - max);
}
}
示例3: setVagrantConnectionType
import com.intellij.openapi.util.UserDataHolderBase; //导入方法依赖的package包/类
public void setVagrantConnectionType(VagrantBasedCredentialsHolder vagrantBasedCredentials) {
myCredentialsTypeHolder = new UserDataHolderBase();
myCredentialsTypeHolder.putUserData(VAGRANT_BASED_CREDENTIALS, vagrantBasedCredentials);
}
示例4: setPlainSshCredentials
import com.intellij.openapi.util.UserDataHolderBase; //导入方法依赖的package包/类
public void setPlainSshCredentials(RemoteCredentialsHolder credentials) {
myCredentialsTypeHolder = new UserDataHolderBase();
myCredentialsTypeHolder.putUserData(PLAIN_SSH_CREDENTIALS, credentials);
}
示例5: setWebDeploymentCredentials
import com.intellij.openapi.util.UserDataHolderBase; //导入方法依赖的package包/类
public void setWebDeploymentCredentials(WebDeploymentCredentialsHolder webDeploymentCredentials) {
myCredentialsTypeHolder = new UserDataHolderBase();
myCredentialsTypeHolder.putUserData(WEB_DEPLOYMENT_BASED_CREDENTIALS, webDeploymentCredentials);
}
示例6: setDockerDeploymentCredentials
import com.intellij.openapi.util.UserDataHolderBase; //导入方法依赖的package包/类
public void setDockerDeploymentCredentials(DockerCredentialsHolder credentials) {
myCredentialsTypeHolder = new UserDataHolderBase();
myCredentialsTypeHolder.putUserData(DOCKER_CREDENTIALS, credentials);
}
示例7: putCredentials
import com.intellij.openapi.util.UserDataHolderBase; //导入方法依赖的package包/类
public void putCredentials(UserDataHolderBase dataHolder, T credentials) {
dataHolder.putUserData(getCredentialsKey(), credentials);
}
示例8: setCredentials
import com.intellij.openapi.util.UserDataHolderBase; //导入方法依赖的package包/类
public <C> void setCredentials(Key<C> key, C credentials) {
myCredentialsTypeHolder = new UserDataHolderBase();
myCredentialsTypeHolder.putUserData(key, credentials);
}