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


Java TreeBasedStructureViewBuilder类代码示例

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


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

示例1: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  return new TreeBasedStructureViewBuilder() {
    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new AppleScriptStructureViewModel(psiFile, editor);
    }

    @Override
    public boolean isRootNodeShown() {
      return true;
    }
  };
}
 
开发者ID:ant-druha,项目名称:AppleScript-IDEA,代码行数:17,代码来源:AppleScriptStructureViewFactory.java

示例2: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
    return new TreeBasedStructureViewBuilder() {
        @NotNull
        @Override
        public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
            return new ProtoStructureViewModel((ProtoPsiFileRoot) psiFile, editor);
        }

        @Override
        public boolean isRootNodeShown() {
            return false;
        }
    };
}
 
开发者ID:protostuff,项目名称:protobuf-jetbrains-plugin,代码行数:17,代码来源:ProtoStructureViewFactory.java

示例3: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
@Nullable
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  if (!(psiFile instanceof PsiJavaFile)) return null;
  return new TreeBasedStructureViewBuilder() {
    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new JavaFileTreeModel((PsiJavaFile)psiFile, editor);
    }

    @Override
    public boolean isRootNodeShown() {
      return false;
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:JavaStructureViewBuilderFactory.java

示例4: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
@Nullable
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  if (!(psiFile instanceof XmlFile)) {
    return null;
  }
  StructureViewBuilder builder = getStructureViewBuilderForExtensions(psiFile);
  if (builder != null) {
    return builder;
  }

  for (XmlStructureViewBuilderProvider xmlStructureViewBuilderProvider : getStructureViewBuilderProviders()) {
    final StructureViewBuilder structureViewBuilder = xmlStructureViewBuilderProvider.createStructureViewBuilder((XmlFile)psiFile);
    if (structureViewBuilder != null) {
      return structureViewBuilder;
    }
  }

  return new TreeBasedStructureViewBuilder() {
    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new XmlStructureViewTreeModel((XmlFile)psiFile, editor);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:XmlStructureViewBuilderFactory.java

示例5: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
@Nullable
public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile file) {
  if (file.getViewProvider().getFileType() != HtmlFileType.INSTANCE) return null;

  return new TreeBasedStructureViewBuilder() {
    @Override
    public boolean isRootNodeShown() {
      return false;
    }

    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new HtmlStructureViewTreeModel(file, editor);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:HtmlStructureViewBuilderProvider.java

示例6: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  return new TreeBasedStructureViewBuilder() {

    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new JavaFileTreeModel((GroovyFileBase)psiFile, editor) {
        @NotNull
        @Override
        public Collection<NodeProvider> getNodeProviders() {
          return Arrays.<NodeProvider>asList(new JavaInheritedMembersNodeProvider());
        }
      };
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GroovyStructureViewFactory.java

示例7: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
@Nullable
public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile file) {
  if (file.getViewProvider().getVirtualFile().getFileType() != HtmlFileType.INSTANCE) return null;

  return new TreeBasedStructureViewBuilder() {
    @Override
    public boolean isRootNodeShown() {
      return false;
    }

    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new HtmlStructureViewTreeModel(file, editor);
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:HtmlStructureViewBuilderProvider.java

示例8: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的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

示例9: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
/**
 * construct view builder
 *
 * @param xmlFile xml file
 * @return structure view builder
 */
@Nullable public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile xmlFile) {
    final DomFileElement fileElement = getFileElement(xmlFile);
    if (fileElement == null) {
        return null;
    }
    return new TreeBasedStructureViewBuilder() {
        @NotNull
        public StructureView createStructureView(final FileEditor fileEditor, final Project project) {
            return new StructureViewComponent(fileEditor, createStructureViewModel(), project);
        }

        @NotNull
        public StructureViewModel createStructureViewModel() {
            return new SqlMapConfigStructureViewTreeModel(xmlFile, fileElement.getRootElement());
        }
    };
}
 
开发者ID:code4craft,项目名称:ibatis-plugin,代码行数:24,代码来源:SqlMapConfigStructureViewBuilderProvider.java

示例10: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
/**
 * construct view builder
 *
 * @param xmlFile xml file
 * @return structure view builder
 */
@Nullable public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile xmlFile) {
    final DomFileElement fileElement = getFileElement(xmlFile);
    if (fileElement == null) {
        return null;
    }
    return new TreeBasedStructureViewBuilder() {
        @NotNull
        public StructureView createStructureView(final FileEditor fileEditor, final Project project) {
            return new StructureViewComponent(fileEditor, createStructureViewModel(), project);
        }

        @NotNull
        public StructureViewModel createStructureViewModel() {
            return new SqlMapStructureViewTreeModel(xmlFile, fileElement.getRootElement());
        }
    };
}
 
开发者ID:code4craft,项目名称:ibatis-plugin,代码行数:24,代码来源:SqlMapStructureViewBuilderProvider.java

示例11: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile)
{
	if(psiFile instanceof CSharpFileImpl)
	{
		return new TreeBasedStructureViewBuilder()
		{
			@NotNull
			@Override
			public StructureViewModel createStructureViewModel(@Nullable Editor editor)
			{
				return new CSharpStructureViewModel(psiFile);
			}
		};
	}
	else
	{
		return null;
	}
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:22,代码来源:CSharpStructureViewFactory.java

示例12: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  if (!(psiFile instanceof HaxeFile)) {
    return null;
  }
  return new TreeBasedStructureViewBuilder() {
    @NotNull
    @Override
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new HaxeStructureViewModel(psiFile, editor);
    }

    @Override
    public boolean isRootNodeShown() {
      return false;
    }
  };
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:19,代码来源:HaxeStructureViewFactory.java

示例13: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile)
{
	return new TreeBasedStructureViewBuilder()
	{
		@Override
		@NotNull
		public StructureViewModel createStructureViewModel(@Nullable Editor editor)
		{
			return new HaxeStructureViewModel(psiFile);
		}

		@Override
		public boolean isRootNodeShown()
		{
			return false;
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:20,代码来源:HaxeStructureViewFactory.java

示例14: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile)
{
	return new TreeBasedStructureViewBuilder()
	{
		@Override
		@NotNull
		public StructureViewModel createStructureViewModel(@Nullable Editor editor)
		{
			return new ThriftStructureViewModel(psiFile);
		}

		@Override
		public boolean isRootNodeShown()
		{
			return false;
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-apache-thrift,代码行数:20,代码来源:ThriftStructureViewFactory.java

示例15: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //导入依赖的package包/类
@Override
@Nullable
public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile file)
{
	if(file.getViewProvider().getVirtualFile().getFileType() != HtmlFileType.INSTANCE)
	{
		return null;
	}

	return new TreeBasedStructureViewBuilder()
	{
		@Override
		public boolean isRootNodeShown()
		{
			return false;
		}

		@Override
		@NotNull
		public StructureViewModel createStructureViewModel(@Nullable Editor editor)
		{
			return new HtmlStructureViewTreeModel(file, editor);
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:26,代码来源:HtmlStructureViewBuilderProvider.java


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