Skip to content

Commit 7308b62

Browse files
committed
Remove dispose call for Colors in StickyScrollingHandler
According to the Javadoc on Colors: * Colors do not need to be disposed, however to maintain compatibility * with older code, disposing a Color is not an error.
1 parent f9feca4 commit 7308b62

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

bundles/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/stickyscroll/StickyScrollingHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ private StickyScrollingControlSettings loadControlSettings(IPreferenceStore stor
122122
int stickyScrollingMaxCount= store.getInt(EDITOR_STICKY_SCROLLING_MAXIMUM_COUNT);
123123

124124
Color lineNumberColor= new Color(PreferenceConverter.getColor(store, EDITOR_LINE_NUMBER_RULER_COLOR));
125-
sourceViewer.getTextWidget().addDisposeListener(e -> lineNumberColor.dispose());
126125
Color stickyLineHoverColor= new Color(PreferenceConverter.getColor(store, EDITOR_CURRENT_LINE_COLOR));
127-
sourceViewer.getTextWidget().addDisposeListener(e -> stickyLineHoverColor.dispose());
128126
Color stickyLineBackgroundColor= sourceViewer.getTextWidget().getBackground();
129127
boolean showLineNumbers= store.getBoolean(EDITOR_LINE_NUMBER_RULER);
130128
Color stickyLineSeparatorColor= null;

0 commit comments

Comments
 (0)