本文整理汇总了Java中com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl类的典型用法代码示例。如果您正苦于以下问题:Java ArrayElementDescriptorImpl类的具体用法?Java ArrayElementDescriptorImpl怎么用?Java ArrayElementDescriptorImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ArrayElementDescriptorImpl类属于com.intellij.debugger.ui.impl.watch包,在下文中一共展示了ArrayElementDescriptorImpl类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChildValueExpression
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
@Override
public PsiExpression getChildValueExpression(DebuggerTreeNode node, DebuggerContext context)
{
LOG.assertTrue(node.getDescriptor() instanceof ArrayElementDescriptorImpl, node.getDescriptor().getClass().getName());
ArrayElementDescriptorImpl descriptor = (ArrayElementDescriptorImpl) node.getDescriptor();
PsiElementFactory elementFactory = JavaPsiFacade.getInstance(node.getProject()).getElementFactory();
try
{
return elementFactory.createExpressionFromText("this[" + descriptor.getIndex() + "]", elementFactory.getArrayClass(LanguageLevel.HIGHEST));
}
catch(IncorrectOperationException e)
{
LOG.error(e);
return null;
}
}
示例2: getModifier
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
public Modifier getModifier() {
Modifier modifier = null;
if (myEvaluatedArrayReference != null) {
modifier = new Modifier() {
public boolean canInspect() {
return true;
}
public boolean canSetValue() {
return true;
}
public void setValue(Value value) throws ClassNotLoadedException, InvalidTypeException {
myEvaluatedArrayReference.setValue(myEvaluatedIndex, value);
}
public Type getExpectedType() throws EvaluateException {
try {
ArrayType type = (ArrayType)myEvaluatedArrayReference.referenceType();
return type.componentType();
}
catch (ClassNotLoadedException e) {
throw EvaluateExceptionUtil.createEvaluateException(e);
}
}
public NodeDescriptorImpl getInspectItem(Project project) {
return new ArrayElementDescriptorImpl(project, myEvaluatedArrayReference, myEvaluatedIndex);
}
};
}
return modifier;
}
示例3: elementIsNull
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
private static boolean elementIsNull(ArrayReference arrayReference, int index) {
try {
return ArrayElementDescriptorImpl.getArrayElement(arrayReference, index) == null;
}
catch (EvaluateException e) {
return false;
}
}
示例4: getChildValueExpression
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
public PsiExpression getChildValueExpression(DebuggerTreeNode node, DebuggerContext context) {
LOG.assertTrue(node.getDescriptor() instanceof ArrayElementDescriptorImpl, node.getDescriptor().getClass().getName());
ArrayElementDescriptorImpl descriptor = (ArrayElementDescriptorImpl)node.getDescriptor();
PsiElementFactory elementFactory = JavaPsiFacade.getInstance(node.getProject()).getElementFactory();
try {
LanguageLevel languageLevel = LanguageLevelProjectExtension.getInstance(node.getProject()).getLanguageLevel();
return elementFactory.createExpressionFromText("this[" + descriptor.getIndex() + "]", elementFactory.getArrayClass(languageLevel));
}
catch (IncorrectOperationException e) {
LOG.error(e);
return null;
}
}
示例5: getChildValueExpression
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
@Override
public PsiElement getChildValueExpression(DebuggerTreeNode node, DebuggerContext context) throws EvaluateException {
LOG.assertTrue(node.getDescriptor() instanceof ArrayElementDescriptorImpl);
try {
return getChildValueExpression("this.get(" + ((ArrayElementDescriptorImpl)node.getDescriptor()).getIndex() + ")", node, context);
}
catch (IncorrectOperationException e) {
// fallback to original
return super.getChildValueExpression(node, context);
}
}
示例6: elementIsNull
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
private static boolean elementIsNull(ArrayReference arrayReference, int index)
{
try
{
return ArrayElementDescriptorImpl.getArrayElement(arrayReference, index) == null;
}
catch(EvaluateException e)
{
return false;
}
}
示例7: getChildValueExpression
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
@Override
public PsiElement getChildValueExpression(DebuggerTreeNode node, DebuggerContext context) throws EvaluateException
{
LOG.assertTrue(node.getDescriptor() instanceof ArrayElementDescriptorImpl);
try
{
return getChildValueExpression("this.get(" + ((ArrayElementDescriptorImpl) node.getDescriptor()).getIndex() + ")", node, context);
}
catch(IncorrectOperationException e)
{
// fallback to original
return super.getChildValueExpression(node, context);
}
}
示例8: createDescriptorImpl
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
protected ArrayElementDescriptorImpl createDescriptorImpl(@NotNull Project project) {
return new ArrayElementDescriptorImpl(project, myArray, myIndex);
}
示例9: getDisplayKey
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
public DisplayKey<ArrayElementDescriptorImpl> getDisplayKey() {
return new ArrayItemDisplayKeyImpl(myIndex);
}
示例10: createDescriptorImpl
import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
protected ArrayElementDescriptorImpl createDescriptorImpl(Project project) {
return new ArrayElementDescriptorImpl(project, myArray, myIndex);
}