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


Java StructureViewModelBase类代码示例

本文整理汇总了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());
		}
	};
}
 
开发者ID:JanTvrdik,项目名称:intellij-latte,代码行数:17,代码来源:LatteStructureViewFactory.java

示例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));
        }
    };
}
 
开发者ID:vermut,项目名称:intellij-snakeyaml,代码行数:13,代码来源:YamlStructureViewFactory.java

示例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);
}
     };
 }
 
开发者ID:antlr,项目名称:intellij-plugin-v4,代码行数:16,代码来源:ANTLRv4StructureViewFactory.java

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


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