<commit_before>---
title: Tree Structure View
---

This tutorial is meant to illustrate how the project tree structure view appearance can be modified programmatically. 
If you need to know more about basic concepts of a project view in IntelliJ-based IDEs, please refer to
[Exploring The Project Structure](https://www.jetbrains.com/idea/help/exploring-the-project-structure.html#d164891e120)
of 
[IntelliJ IDEA Web Help](https://www.jetbrains.com/idea/help/intellij-idea.html).

Series of step below show how to filter out and keep visible only text files and directories in the Project View Panel. 

## Pre-requirements

Create an empty plugin project.
See 
[Creating a Plugin Project](/basics/getting_started/creating_plugin_project.md).

## 1. Register Custom TreeStructure Provider

Add new *treeStructureProvider* extension to the
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/tree_structure_provider/src/main/resources/META-INF/plugin.xml)

```java
<extensions defaultExtensionNs="com.intellij">
  <treeStructureProvider implementation="org.jetbrains.tutorials.tree.structure.TextOnlyTreeStructureProvider"/>
</extensions>
```

## 2. Implement Custom TreeStructureProvider

To provide custom Structure View behaviour you need to implement TreeStructureProvider interface.  

```java
public class TextOnlyTreeStructureProvider implements TreeStructureProvider {
    @NotNull
    @Override<commit_msg>tree_structure_view.md: link to create new plugin with Gradle<commit_after>---
title: Tree Structure View
---

This tutorial is meant to illustrate how the project tree structure view appearance can be modified programmatically. 
If you need to know more about basic concepts of a project view in IntelliJ-based IDEs, please refer to
[Exploring The Project Structure](https://www.jetbrains.com/idea/help/exploring-the-project-structure.html#d164891e120)
of 
[IntelliJ IDEA Web Help](https://www.jetbrains.com/idea/help/intellij-idea.html).

Series of step below show how to filter out and keep visible only text files and directories in the Project View Panel. 

## Pre-requirements

Create an empty plugin project.
See 
[Creating a Plugin Project](/tutorials/build_system/prerequisites.md).

## 1. Register Custom TreeStructure Provider

Add new *treeStructureProvider* extension to the
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/tree_structure_provider/src/main/resources/META-INF/plugin.xml)

```java
<extensions defaultExtensionNs="com.intellij">
  <treeStructureProvider implementation="org.jetbrains.tutorials.tree.structure.TextOnlyTreeStructureProvider"/>
</extensions>
```

## 2. Implement Custom TreeStructureProvider

To provide custom Structure View behaviour you need to implement TreeStructureProvider interface.  

```java
public class TextOnlyTreeStructureProvider implements TreeStructureProvider {
    @NotNull
    @Override
{'fraction_non_alphanumeric': 0.08532423208191127, 'fraction_numerical': 0.007508532423208191, 'mean_word_length': 5.441758241758242, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5980291', 'n_tokens_mistral': 842, 'n_tokens_neox': 781, 'n_words': 256}