How to handle multiple error messages in Editor?

Answered

Hi, 

I'm create a custom editor provider that implements 

  • com.intellij.openapi.fileEditor.FileEditorProvider

  • com.intellij.openapi.project.PossiblyDumbAware

 

And in the createEditor method, i returned custom components for editing my own file (using custom filetype)

It works OK as an editor, But when IntelliJ platform creating a message in the editor area, it shows multiple rows as follows:

As this screen shot, i tested it on the Android studio (for creating message), but it may occur in IntelliJ platform TOO. (i think..)

 

How can i handle this? I spend much time for fixing this ab-normal functioning, but i cannot handle this....

In other editor (like xml editor) it shows ONLY ONE row. but in my own editor, it shows multiple rows.

 

Thanks in advance. 

3 comments
Comment actions Permalink

add comment:

- there are only one row when modify build.gradle file, but modify build gradle file multiple times, it shows multiple rows.

  (other editors are show that message only one row.)

 

What's difference between this editor and others?

0
Comment actions Permalink

You probably haven't implemented methods getUserData/putUserData in your FileEditor implementation. As an option you can extend your implementation from UserDataHolderBase to get a standard implementation.

0
Comment actions Permalink

Dear Dmitry Batrak,

Thank you for your help! I checked your comment and modify my class to extends UserDataHolderBase.

That works properly!

 

Thank you for your help!

Have a nice day!

0

Please sign in to leave a comment.