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


Java ItemPresentation类代码示例

本文整理汇总了Java中com.intellij.navigation.ItemPresentation的典型用法代码示例。如果您正苦于以下问题:Java ItemPresentation类的具体用法?Java ItemPresentation怎么用?Java ItemPresentation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
public static ItemPresentation getPresentation(final TSFnDeclStmt function) {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            if (function.getFunctionType() == TSFunctionType.GLOBAL) {
                return function.getFunctionName();
            } else {
                return function.getNamespace() + "::" + function.getFunctionName();
            }
        }

        @Nullable
        @Override
        public String getLocationString() {
            return function.getContainingFile().getName();
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return TSIcons.FILE;
        }
    };
}
 
开发者ID:CouleeApps,项目名称:TS-IJ,代码行数:26,代码来源:TSPsiImplUtil.java

示例2: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Override
        public Icon getIcon(boolean unused) {
            return Icons.TYPE;
        }
    };
}
 
开发者ID:reasonml-editor,项目名称:reasonml-idea-plugin,代码行数:21,代码来源:PsiTypeImpl.java

示例3: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Override
        public Icon getIcon(boolean unused) {
            return Icons.INCLUDE;
        }
    };
}
 
开发者ID:reasonml-editor,项目名称:reasonml-idea-plugin,代码行数:22,代码来源:PsiIncludeImpl.java

示例4: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return Icons.OPEN;
        }
    };
}
 
开发者ID:reasonml-editor,项目名称:reasonml-idea-plugin,代码行数:23,代码来源:PsiOpenImpl.java

示例5: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return Icons.MODULE;
        }
    };
}
 
开发者ID:reasonml-editor,项目名称:reasonml-idea-plugin,代码行数:22,代码来源:PsiModuleImpl.java

示例6: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return Icons.EXCEPTION;
        }
    };
}
 
开发者ID:reasonml-editor,项目名称:reasonml-idea-plugin,代码行数:23,代码来源:PsiExceptionImpl.java

示例7: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return Icons.VAL;
        }
    };
}
 
开发者ID:reasonml-editor,项目名称:reasonml-idea-plugin,代码行数:23,代码来源:PsiValImpl.java

示例8: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return element.getVirtualFile().getName().toString();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return element.getVirtualFile().getCanonicalPath();
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return GCMIcons.GCM_ICON_16x16;
        }
    };
}
 
开发者ID:datathings,项目名称:greycat-idea-plugin,代码行数:24,代码来源:GCMStructureViewRootElement.java

示例9: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return simpleType;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return AllIcons.Actions.MoveUp;
        }
    };
}
 
开发者ID:datathings,项目名称:greycat-idea-plugin,代码行数:24,代码来源:GCMStructureViewParentElement.java

示例10: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return packageName;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return "";
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return PlatformIcons.PACKAGE_ICON;
        }
    };
}
 
开发者ID:datathings,项目名称:greycat-idea-plugin,代码行数:24,代码来源:GCMStructureViewPackageElement.java

示例11: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return attDecl.getAttributeName().getText() + " : " + simpleType;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return myIcon;
        }
    };
}
 
开发者ID:datathings,项目名称:greycat-idea-plugin,代码行数:24,代码来源:GCMStructureViewAttributeElement.java

示例12: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return presText;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return PlatformIcons.CLASS_ICON;
        }
    };
}
 
开发者ID:datathings,项目名称:greycat-idea-plugin,代码行数:24,代码来源:GCMStructureViewClassElement.java

示例13: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return getNode().getPsi().getContainingFile().getName();
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return GCMIcons.GCM_ICON_16x16;
        }
    };
}
 
开发者ID:datathings,项目名称:greycat-idea-plugin,代码行数:23,代码来源:GCMNamedElementImpl.java

示例14: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
public static ItemPresentation getPresentation(final GCMTypeDeclaration element) {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return element.getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return element.getContainingFile().getName();
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return GCMIcons.GCM_ICON_16x16;
        }
    };
}
 
开发者ID:datathings,项目名称:greycat-idea-plugin,代码行数:22,代码来源:GCMUtil.java

示例15: getPresentation

import com.intellij.navigation.ItemPresentation; //导入依赖的package包/类
public static ItemPresentation getPresentation(final CptTemplate element) {
	return new ItemPresentation() {
		@Nullable
		@Override
		public String getPresentableText() {
			return element.getTemplateName();
		}

		@Nullable
		@Override
		public String getLocationString() {
			PsiFile containingFile = element.getContainingFile();
			return containingFile == null ? null : containingFile.getName();
		}

		@Nullable
		@Override
		public Icon getIcon(boolean unused) {
			return CptIcons.FILE;
		}
	};
}
 
开发者ID:xylo,项目名称:intellij-postfix-templates,代码行数:23,代码来源:CptPsiImplUtil.java


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