本文整理汇总了Java中com.intellij.navigation.ItemPresentationProviders类的典型用法代码示例。如果您正苦于以下问题:Java ItemPresentationProviders类的具体用法?Java ItemPresentationProviders怎么用?Java ItemPresentationProviders使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ItemPresentationProviders类属于com.intellij.navigation包,在下文中一共展示了ItemPresentationProviders类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPresentation
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation(@NotNull final GroovyFile file) {
return new ItemPresentation() {
@Override
public String getPresentableText() {
return GroovyBundle.message("groovy.file.0", file.getName());
}
@Override
public String getLocationString() {
PsiDirectory directory = file.getContainingDirectory();
return ItemPresentationProviders.getItemPresentation(directory).getPresentableText();
}
@Override
public Icon getIcon(boolean unused) {
return file.getIcon(Iconable.ICON_FLAG_VISIBILITY | Iconable.ICON_FLAG_READ_STATUS);
}
};
}
示例2: getPresentation
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation(final GroovyFile file) {
return new ItemPresentation() {
@Override
public String getPresentableText() {
return GroovyBundle.message("groovy.file.0", file.getName());
}
@Override
public String getLocationString() {
PsiDirectory directory = file.getContainingDirectory();
return ItemPresentationProviders.getItemPresentation(directory).getPresentableText();
}
@Override
public Icon getIcon(boolean unused) {
return file.getIcon(Iconable.ICON_FLAG_VISIBILITY | Iconable.ICON_FLAG_READ_STATUS);
}
};
}
示例3: JavaCoreApplicationEnvironment
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
public JavaCoreApplicationEnvironment(Disposable parentDisposable) {
super(parentDisposable);
registerFileType(JavaClassFileType.INSTANCE, "class");
registerFileType(JavaFileType.INSTANCE, "java");
registerFileType(ArchiveFileType.INSTANCE, "jar;zip");
addExplicitExtension(FileTypeFileViewProviders.INSTANCE, JavaClassFileType.INSTANCE, new ClassFileViewProviderFactory());
addExplicitExtension(BinaryFileStubBuilders.INSTANCE, JavaClassFileType.INSTANCE, new ClassFileStubBuilder());
addExplicitExtension(LanguageASTFactory.INSTANCE, JavaLanguage.INSTANCE, new CoreJavaASTFactory());
addExplicitExtension(LanguageParserDefinitions.INSTANCE, JavaLanguage.INSTANCE, new JavaParserDefinition());
addExplicitExtension(LanguageConstantExpressionEvaluator.INSTANCE, JavaLanguage.INSTANCE, new PsiExpressionEvaluator());
registerExtensionPoint(Extensions.getRootArea(), ClsStubBuilderFactory.EP_NAME, ClsStubBuilderFactory.class);
registerExtensionPoint(Extensions.getRootArea(), PsiAugmentProvider.EP_NAME, PsiAugmentProvider.class);
registerExtensionPoint(Extensions.getRootArea(), JavaMainMethodProvider.EP_NAME, JavaMainMethodProvider.class);
addExtension(ClsStubBuilderFactory.EP_NAME, new DefaultClsStubBuilderFactory());
myApplication.registerService(PsiPackageImplementationHelper.class, new CorePsiPackageImplementationHelper());
myApplication.registerService(EmptySubstitutor.class, new EmptySubstitutorImpl());
myApplication.registerService(JavaDirectoryService.class, createJavaDirectoryService());
myApplication.registerService(JavaVersionService.class, new JavaVersionService());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiPackage.class, new PackagePresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiClass.class, new ClassPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiMethod.class, new MethodPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiField.class, new FieldPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiLocalVariable.class, new VariablePresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiParameter.class, new VariablePresentationProvider());
}
示例4: JavaCoreApplicationEnvironment
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
public JavaCoreApplicationEnvironment(Disposable parentDisposable) {
super(parentDisposable);
registerFileType(JavaClassFileType.INSTANCE, "class");
registerFileType(JavaFileType.INSTANCE, "java");
registerFileType(JarArchiveFileType.INSTANCE, "jar");
addExplicitExtension(FileTypeFileViewProviders.INSTANCE, JavaClassFileType.INSTANCE, new ClassFileViewProviderFactory());
addExplicitExtension(BinaryFileStubBuilders.INSTANCE, JavaClassFileType.INSTANCE, new ClassFileStubBuilder());
addExplicitExtension(LanguageParserDefinitions.INSTANCE, JavaLanguage.INSTANCE, new JavaParserDefinition());
addExplicitExtension(LanguageConstantExpressionEvaluator.INSTANCE, JavaLanguage.INSTANCE, new PsiExpressionEvaluator());
registerExtensionPoint(Extensions.getRootArea(), PsiAugmentProvider.EP_NAME, PsiAugmentProvider.class);
registerExtensionPoint(Extensions.getRootArea(), JavaMainMethodProvider.EP_NAME, JavaMainMethodProvider.class);
myApplication.registerService(PsiPackageImplementationHelper.class, new CorePsiPackageImplementationHelper());
myApplication.registerService(EmptySubstitutor.class, new EmptySubstitutorImpl());
myApplication.registerService(JavaDirectoryService.class, createJavaDirectoryService());
myApplication.registerService(JavaVersionService.class, new JavaVersionService());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiJavaPackage.class, new PackagePresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiClass.class, new ClassPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiMethod.class, new MethodPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiField.class, new FieldPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiLocalVariable.class, new VariablePresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiParameter.class, new VariablePresentationProvider());
}
示例5: getIcon
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
@Nullable
@Override
protected Icon getIcon(@NotNull Object item) {
if (item instanceof NavigationItem) {
ItemPresentation itemPresentation = ItemPresentationProviders.getItemPresentation((NavigationItem)item);
if (itemPresentation != null) {
return itemPresentation.getIcon(false);
}
}
return null;
}
示例6: getPresentation
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation()
{
// Necessary for ManShortNamesCache
return ItemPresentationProviders.getItemPresentation( this );
}
示例7: getPresentation
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation()
{
// Necessary for ManShortNamesCache
return ItemPresentationProviders.getItemPresentation( getDelegate() );
}
示例8: getPresentation
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation() {
return ItemPresentationProviders.getItemPresentation(this);
}
示例9: getPresentation
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
@Override
public ItemPresentation getPresentation() {
return ItemPresentationProviders.getItemPresentation(this);
}
示例10: JavaCoreApplicationEnvironment
import com.intellij.navigation.ItemPresentationProviders; //导入依赖的package包/类
public JavaCoreApplicationEnvironment(@NotNull Disposable parentDisposable) {
super(parentDisposable);
registerFileType(JavaClassFileType.INSTANCE, "class");
registerFileType(JavaFileType.INSTANCE, "java");
registerFileType(ArchiveFileType.INSTANCE, "jar;zip");
registerFileType(PlainTextFileType.INSTANCE, "txt;sh;bat;cmd;policy;log;cgi;MF;jad;jam;htaccess");
addExplicitExtension(LanguageASTFactory.INSTANCE, PlainTextLanguage.INSTANCE, new PlainTextASTFactory());
addExplicitExtension(LanguageParserDefinitions.INSTANCE, PlainTextLanguage.INSTANCE, new PlainTextParserDefinition());
addExplicitExtension(FileTypeFileViewProviders.INSTANCE, JavaClassFileType.INSTANCE, new ClassFileViewProviderFactory());
addExplicitExtension(BinaryFileStubBuilders.INSTANCE, JavaClassFileType.INSTANCE, new ClassFileStubBuilder());
addExplicitExtension(LanguageASTFactory.INSTANCE, JavaLanguage.INSTANCE, new CoreJavaASTFactory());
addExplicitExtension(LanguageParserDefinitions.INSTANCE, JavaLanguage.INSTANCE, new JavaParserDefinition());
addExplicitExtension(LanguageConstantExpressionEvaluator.INSTANCE, JavaLanguage.INSTANCE, new PsiExpressionEvaluator());
addExtension(ContainerProvider.EP_NAME, new JavaContainerProvider());
myApplication.registerService(PsiPackageImplementationHelper.class, new CorePsiPackageImplementationHelper());
myApplication.registerService(EmptySubstitutor.class, new EmptySubstitutorImpl());
myApplication.registerService(JavaDirectoryService.class, createJavaDirectoryService());
myApplication.registerService(JavaVersionService.class, new JavaVersionService());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiPackage.class, new PackagePresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiClass.class, new ClassPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiMethod.class, new MethodPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiField.class, new FieldPresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiLocalVariable.class, new VariablePresentationProvider());
addExplicitExtension(ItemPresentationProviders.INSTANCE, PsiParameter.class, new VariablePresentationProvider());
registerApplicationService(JavaCodeFoldingSettings.class, new JavaCodeFoldingSettingsBase());
addExplicitExtension(LanguageFolding.INSTANCE, JavaLanguage.INSTANCE, new JavaFoldingBuilderBase() {
@Override
protected boolean shouldShowExplicitLambdaType(PsiAnonymousClass anonymousClass, PsiNewExpression expression) {
return false;
}
@Override
protected boolean isBelowRightMargin(Project project, int lineLength) {
return false;
}
});
registerApplicationExtensionPoint(SuperMethodsSearch.EP_NAME, QueryExecutor.class);
addExtension(SuperMethodsSearch.EP_NAME, new MethodSuperSearcher());
}