How can i show/hide the tab asterisk at runtime?
In Settings/Editor(IDE Settings)/Editor Tabs: I Checked "Mark modified tabs with asterisk"
I have :
public class MyEditor implements FileEditor, FileEditorManagerListener { ....
@Override
public boolean isModified() {
return isDirty;
}
public void changeIsModifiedState(boolean newDirtyState) {
if (isDirty != newDirtyState) {
isDirty = newDirtyState;
..... ...... //code to neede to fire the change
}
}
I want to use the second method to show or hide the "asterisk" whenever i need to.
How can this be done? Or any other suggestion. Thank you!
Please sign in to leave a comment.
You need to implement the addPropertyChangeListener/removePropertyChangeListener methods and call the propertyChange() method of the listeners with the property name of FileEditor.PROP_MODIFIED.
Thank you!