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


Java ArrayElementDescriptorImpl类代码示例

本文整理汇总了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;
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:ArrayRenderer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:ArrayAccessEvaluator.java

示例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;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ArrayRenderer.java

示例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;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:ArrayRenderer.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:NodeRendererSettings.java

示例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;
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:12,代码来源:ArrayRenderer.java

示例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);
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:15,代码来源:NodeRendererSettings.java

示例8: createDescriptorImpl

import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
protected ArrayElementDescriptorImpl createDescriptorImpl(@NotNull Project project) {
  return new ArrayElementDescriptorImpl(project, myArray, myIndex);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ArrayItemData.java

示例9: getDisplayKey

import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
public DisplayKey<ArrayElementDescriptorImpl> getDisplayKey() {
  return new ArrayItemDisplayKeyImpl(myIndex);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ArrayItemData.java

示例10: createDescriptorImpl

import com.intellij.debugger.ui.impl.watch.ArrayElementDescriptorImpl; //导入依赖的package包/类
protected ArrayElementDescriptorImpl createDescriptorImpl(Project project) {
  return new ArrayElementDescriptorImpl(project, myArray, myIndex);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:ArrayItemData.java


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