Display a list of changed files in ToolWindow

Answered

Hey,

I want to have a ToolWindow that displays all changed files and using BulkFileListener updates the list once a file has been changed. However after reading around I don't think BulkFileListener is a good match. Any suggestions how can I achieve this?

0
3 comments

Hi,

Could you please clarify what files you want to display in the tool window? Please describe your use case in steps. When should files appear in the tool window?

Also, what did you read that discouraged you from using the BulkFileListener?

0

I read this, where the person wanted a similar result but was discouraged to use BulkFileListener

https://intellij-support.jetbrains.com/hc/en-us/community/posts/4406286647954-How-to-update-a-custom-ToolWindow-with-content-from-a-Listener-class

Okay, I'll describe step by step what I want

Lets say we have a Java project which was a couple of files 

Program.java

Main.java

Service.java

Once the user edits a file, for example in Main.java user adds a new method

Than the plugin should receive a event and display Main.java file in the tool window

I want something similar to this functionality but as a tool window and the tool window is updated if a file is changed

https://www.jetbrains.com/help/idea/navigating-through-the-source-code.html#recent_files

 

0

Hi,

Thanks for clarifications.

Please check com.intellij.openapi.fileEditor.ex.IdeDocumentHistory#getChangedFiles.

0

Please sign in to leave a comment.