Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Correctly disposing NodeHighlightManager since it's necessary now bec…

…ause of the latest hanges in EditorComponent.refreshHighlightManager() method
  • Loading branch information...
commit cc8c0d92ed7e28119591d3d183cb7c769ca39d97 1 parent c30fe9d
@ashatalin ashatalin authored
View
4 core/languageDesign/editor/source/jetbrains/mps/nodeEditor/NodeHighlightManager.java
@@ -54,6 +54,7 @@ public int compare(EditorMessage m1, EditorMessage m2) {
*/
private Map<EditorCell, List<EditorMessage>> myMessagesCache;
public ReloadAdapter myHandler;
+ private RebuildListener myRebuildListener;
private Set<EditorMessageIconRenderer> myIconRenderersCache = new HashSet<EditorMessageIconRenderer>();
private boolean myRebuildIconRenderersCacheFlag;
@@ -65,7 +66,7 @@ public void onReload() {
}
};
- edtitor.addRebuildListener(new RebuildListener() {
+ edtitor.addRebuildListener(myRebuildListener = new RebuildListener() {
public void editorRebuilt(EditorComponent editor) {
synchronized (myMessagesLock) {
if (myMessagesCache == null) {
@@ -376,6 +377,7 @@ public EditorMessage getMessageFor(SNode node) {
public void dispose() {
ClassLoaderManager.getInstance().removeReloadHandler(myHandler);
+ myEditor.removeRebuildListener(myRebuildListener);
}
public EditorCell getCell(EditorMessage change) {
Please sign in to comment.
Something went wrong with that request. Please try again.