本文整理汇总了Java中com.intellij.ide.structureView.StructureViewModelBase类的典型用法代码示例。如果您正苦于以下问题:Java StructureViewModelBase类的具体用法?Java StructureViewModelBase怎么用?Java StructureViewModelBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StructureViewModelBase类属于com.intellij.ide.structureView包,在下文中一共展示了StructureViewModelBase类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStructureViewBuilder
import com.intellij.ide.structureView.StructureViewModelBase; //导入依赖的package包/类
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
return new TemplateLanguageStructureViewBuilder(psiFile) {
@Override
protected StructureViewComposite.StructureViewDescriptor createMainView(FileEditor fileEditor, PsiFile mainFile) {
StructureView mainView = (new TreeBasedStructureViewBuilder() {
@NotNull
public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
return new StructureViewModelBase(psiFile, editor, new LatteStructureViewTreeElement(psiFile));
}
}).createStructureView(fileEditor, mainFile.getProject());
return new StructureViewComposite.StructureViewDescriptor("Latte", mainView, mainFile.getFileType().getIcon());
}
};
}
示例2: getStructureViewBuilder
import com.intellij.ide.structureView.StructureViewModelBase; //导入依赖的package包/类
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile file) {
if (!(file instanceof YamlFile)) return null;
return new TreeBasedStructureViewBuilder() {
@NotNull
@Override
public StructureViewModel createStructureViewModel(Editor editor) {
return new StructureViewModelBase(file, new YamlStructureViewElement(file));
}
};
}
示例3: getStructureViewBuilder
import com.intellij.ide.structureView.StructureViewModelBase; //导入依赖的package包/类
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
return new TreeBasedStructureViewBuilder() {
@NotNull
@Override
public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
VirtualFile grammarFile = psiFile.getVirtualFile();
if ( grammarFile==null || !grammarFile.getName().endsWith(".g4") ) {
return new StructureViewModelBase(psiFile, new DummyViewTreeElement(psiFile));
}
return new ANTLRv4StructureViewModel((ANTLRv4FileRoot)psiFile);
}
};
}
示例4: getStructureViewBuilder
import com.intellij.ide.structureView.StructureViewModelBase; //导入依赖的package包/类
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile)
{
return new TreeBasedStructureViewBuilder()
{
@NotNull
@Override
public StructureViewModel createStructureViewModel(Editor editor)
{
return new StructureViewModelBase(psiFile, new CssStructureViewTreeElement((CssFile) psiFile));
}
};
}