how to get the size in bytes for the current opened file and the runtime version?

Answered

Hello,

Thanks for the Plugin SDK, it was really helpful. I have couple of questions where I couldn't find any documentation for it.

1. I need to get the size of the currently opened file. Is there a way that I can fetch using the path or there is any specific syntax using plugin sdk.

2. Using plugin sdk, is there a way to find the runtime version of the currently opened file?

3 comments
Comment actions Permalink

1) from VirtualFile: see com.intellij.ide.projectView.impl.ProjectViewRenderer#appendInplaceComments

2) not sure what you mean with "runtime version" - SDK for project can be obtained as shown here https://plugins.jetbrains.com/docs/intellij/sdk.html or for Module https://plugins.jetbrains.com/docs/intellij/module.html#how-do-i-get-the-sdk-the-module-uses

0
Comment actions Permalink

Thanks for getting back,

I didn't quiet get the first one.

Can you please help me in getting the size of document using intellij sdk.

 

0
Comment actions Permalink

It is functionality located in IntelliJ Community sources https://github.com/JetBrains/intellij-community/

 

0

Please sign in to leave a comment.