Skip to content

Dispose all cell editors of the PCA samples table - #3164

Merged
eselmeister merged 1 commit into
eclipse-chemclipse:developfrom
akurtakov:pca-color-cell-editor-dispose
Sep 25, 2026
Merged

eselmeister merged 1 commit into
eclipse-chemclipse:developfrom
akurtakov:pca-color-cell-editor-dispose

Conversation

@akurtakov

Copy link
Copy Markdown
Contributor

SamplesListUI created one SamplesEditingSupport per editable column but kept only the last one, so the ColorCellEditor and its preview image were never disposed. The dispose() override in AnalysisEditorUI that was meant to clean up is not called when the part closes and also skipped super.dispose().

Keep all editing supports and dispose them when the table is disposed.

Assisted-by: Anthropic Claude Code (claude-opus-5-5[1m])

@akurtakov

Copy link
Copy Markdown
Contributor Author

Fixes disposal problems in the log:

(OpenChrom (Hillenkamp):1999092): Gtk-WARNING **: 08:50:46.032: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 0
java.lang.Error: SWT Resource was not properly disposed
    at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:191)
    at org.eclipse.swt.graphics.Resource.<init>(Resource.java:124)
    at org.eclipse.swt.graphics.Image.<init>(Image.java:508)
    at org.eclipse.jface.viewers.ColorCellEditor.updateContents(ColorCellEditor.java:235)
    at org.eclipse.jface.viewers.DialogCellEditor.doSetValue(DialogCellEditor.java:311)
    at org.eclipse.jface.viewers.ColorCellEditor.<init>(ColorCellEditor.java:132)
    at org.eclipse.jface.viewers.ColorCellEditor.<init>(ColorCellEditor.java:118)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.internal.provider.SamplesEditingSupport.<init>(SamplesEditingSupport.java:44)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.swt.SamplesListUI.setEditingSupport(SamplesListUI.java:93)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.swt.SamplesListUI.createColumns(SamplesListUI.java:82)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.swt.SamplesListUI.<init>(SamplesListUI.java:49)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.swt.AnalysisEditorUI.createSampleListUI(AnalysisEditorUI.java:604)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.swt.AnalysisEditorUI.createSamplesSection(AnalysisEditorUI.java:354)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.swt.AnalysisEditorUI.createDataTab(AnalysisEditorUI.java:340)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.swt.AnalysisEditorUI.createControl(AnalysisEditorUI.java:165)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.swt.AnalysisEditorUI.<init>(AnalysisEditorUI.java:112)
    at org.eclipse.chemclipse.xxd.process.supplier.pca.ui.editors.PCAEditor.createControl(PCAEditor.java:60)

SamplesListUI created one SamplesEditingSupport per editable column but
kept only the last one, so the ColorCellEditor and its preview image
were
never disposed. The dispose() override in AnalysisEditorUI that was
meant
to clean up is not called when the part closes and also skipped
super.dispose().

Keep all editing supports and dispose them when the table is disposed.

Assisted-by: Anthropic Claude Code (claude-opus-5-5[1m])
@akurtakov
akurtakov force-pushed the pca-color-cell-editor-dispose branch from 7ea6387 to 84629e1 Compare September 25, 2026 06:37
@eselmeister
eselmeister merged commit 46ce8f6 into eclipse-chemclipse:develop Sep 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants