mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
Custom tree structure provider stub
This commit is contained in:
parent
bb6e4f53f0
commit
ba50fd0562
@ -0,0 +1,27 @@
|
|||||||
|
package org.jetbrains.plugins.sample;
|
||||||
|
|
||||||
|
import com.intellij.ide.projectView.TreeStructureProvider;
|
||||||
|
import com.intellij.ide.projectView.ViewSettings;
|
||||||
|
import com.intellij.ide.util.treeView.AbstractTreeNode;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anna Bulenkova
|
||||||
|
*/
|
||||||
|
public class CustomTreeStructureProvider implements TreeStructureProvider {
|
||||||
|
@NotNull
|
||||||
|
@Override
|
||||||
|
public Collection<AbstractTreeNode> modify(@NotNull AbstractTreeNode abstractTreeNode, @NotNull Collection<AbstractTreeNode> collection, ViewSettings viewSettings) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public Object getData(Collection<AbstractTreeNode> collection, String s) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
31
code_samples/tree_structure_provider/META-INF/plugin.xml
Normal file
31
code_samples/tree_structure_provider/META-INF/plugin.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<idea-plugin version="2" url="www.jetbrains.com">
|
||||||
|
<id>org.jetbrains.plugins.sample.TreeStructure</id>
|
||||||
|
<name>Tree Structure Provider Demo</name>
|
||||||
|
<version>1.0</version>
|
||||||
|
<vendor email="support@jetbrains.com" url="http://www.jetbrains.com">JetBrains</vendor>
|
||||||
|
|
||||||
|
<description>Tree Structure Provider Demo</description>
|
||||||
|
|
||||||
|
<change-notes>Initial commit</change-notes>
|
||||||
|
|
||||||
|
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Build+Number+Ranges for description -->
|
||||||
|
<idea-version since-build="131"/>
|
||||||
|
<depends>com.intellij.modules.lang</depends>
|
||||||
|
|
||||||
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
|
<treeStructureProvider implementation="org.jetbrains.plugins.sample.CustomTreeStructureProvider"/>
|
||||||
|
</extensions>
|
||||||
|
|
||||||
|
<application-components>
|
||||||
|
<!-- Add your application components here -->
|
||||||
|
</application-components>
|
||||||
|
|
||||||
|
<project-components>
|
||||||
|
<!-- Add your project components here -->
|
||||||
|
</project-components>
|
||||||
|
|
||||||
|
<actions>
|
||||||
|
<!-- Add your actions here -->
|
||||||
|
</actions>
|
||||||
|
|
||||||
|
</idea-plugin>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module version="4">
|
||||||
|
<component name="DevKit.ModuleBuildProperties" url="file://$MODULE_DIR$/META-INF/plugin.xml" />
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
Loading…
x
Reference in New Issue
Block a user