本文整理汇总了Java中com.intellij.lang.LanguageExtension类的典型用法代码示例。如果您正苦于以下问题:Java LanguageExtension类的具体用法?Java LanguageExtension怎么用?Java LanguageExtension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LanguageExtension类属于com.intellij.lang包,在下文中一共展示了LanguageExtension类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: findBestHierarchyProvider
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
@Nullable
public static HierarchyProvider findBestHierarchyProvider(final LanguageExtension<HierarchyProvider> extension,
@Nullable PsiElement element,
DataContext dataContext) {
if (element == null) return null;
List<HierarchyProvider> providers = extension.allForLanguage(element.getLanguage());
for (HierarchyProvider provider : providers) {
PsiElement target = provider.getTarget(dataContext);
if (target != null) {
return provider;
}
}
return ContainerUtil.getFirstItem(providers);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:BrowseHierarchyActionBase.java
示例2: findProvider
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
@Nullable
@RequiredReadAction
public static HierarchyProvider findProvider(@Nonnull LanguageExtension<HierarchyProvider> extension,
@Nullable PsiElement psiElement,
@Nullable PsiFile psiFile,
@Nonnull DataContext dataContext) {
final HierarchyProvider provider = findBestHierarchyProvider(extension, psiElement, dataContext);
if (provider == null) {
return findBestHierarchyProvider(extension, psiFile, dataContext);
}
return provider;
}
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:BrowseHierarchyActionBase.java
示例3: findBestHierarchyProvider
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
@Nullable
@RequiredReadAction
public static HierarchyProvider findBestHierarchyProvider(final LanguageExtension<HierarchyProvider> extension,
@Nullable PsiElement element,
DataContext dataContext) {
if (element == null) return null;
List<HierarchyProvider> providers = extension.allForLanguage(element.getLanguage());
for (HierarchyProvider provider : providers) {
PsiElement target = provider.getTarget(dataContext);
if (target != null) {
return provider;
}
}
return ContainerUtil.getFirstItem(providers);
}
开发者ID:consulo,项目名称:consulo,代码行数:16,代码来源:BrowseHierarchyActionBase.java
示例4: BaseOnThisElementAction
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
BaseOnThisElementAction(@Nonnull String text,
@Nonnull String actionId,
@Nonnull Key<?> browserDataKey,
@Nonnull LanguageExtension<HierarchyProvider> providerLanguageExtension) {
super(text);
myActionId = actionId;
myBrowserDataKey = browserDataKey;
myProviderLanguageExtension = providerLanguageExtension;
}
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:HierarchyBrowserBaseEx.java
示例5: getLanguageExtension
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
@NotNull
@Override
protected LanguageExtension<CodeInsightActionHandler> getLanguageExtension() {
return CodeInsightActions.GOTO_SUPER;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:GotoSuperAction.java
示例6: getLanguageExtension
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
@NotNull
@Override
protected LanguageExtension<LanguageCodeInsightActionHandler> getLanguageExtension() {
return CodeInsightActions.IMPLEMENT_METHOD;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ImplementMethodsAction.java
示例7: getLanguageExtension
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
@NotNull
@Override
protected LanguageExtension<LanguageCodeInsightActionHandler> getLanguageExtension() {
return CodeInsightActions.OVERRIDE_METHOD;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:OverrideMethodsAction.java
示例8: getLanguageExtension
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
@NotNull
protected abstract LanguageExtension<? extends CodeInsightActionHandler> getLanguageExtension();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:PresentableActionHandlerBasedAction.java
示例9: BrowseHierarchyActionBase
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
protected BrowseHierarchyActionBase(final LanguageExtension<HierarchyProvider> extension) {
myExtension = extension;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:BrowseHierarchyActionBase.java
示例10: addExplicitExtension
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
public <T> void addExplicitExtension(@Nonnull LanguageExtension<T> instance, @Nonnull Language language, @Nonnull T object) {
doAddExplicitExtension(instance, language, object);
}
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:CoreApplicationEnvironment.java
示例11: BrowseHierarchyActionBase
import com.intellij.lang.LanguageExtension; //导入依赖的package包/类
protected BrowseHierarchyActionBase(@Nonnull LanguageExtension<HierarchyProvider> extension) {
myExtension = extension;
}
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:BrowseHierarchyActionBase.java
注:本文中的com.intellij.lang.LanguageExtension类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论