| Summary: | [CellEditors] NPE Jface ColumnViewerEditor. fireApplyEditorValue() in doSetFocus() | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Quincy Mitchell <quincy.cs> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | ||
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
ok so the scenario... i have a table which i attach a celleditor. I want the celleditor to be a dialog. i want the user to be able to click a cell and a dialog immediately popup to view the contents of the row's model. then when ok is pressed then the changes are applied to the row's model. if cancel is clicked then the row's model is unaffected. basically i want the dialogcelleditor without its text cell editor. so what i did was create my own celleditor similar to the dialogcelleditor. however when setfocus happens, it opens the dialog then applies the celleditorsvalue and then returns from setfocus. however the jface platform assumes that the celleditor will exist after the setfocus has been done. this is incorrect because when i apply the celleditor's value the celleditor will be made null. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build Identifier: If you fireApplyEditorValue() in a doSetFocus() then you will always get a NPE. My proposed fix is: ColumnViewerEditor [CODE] private boolean activateCellEditor(final ColumnViewerEditorActivationEvent activationEvent) { .... cellEditor.setFocus(); /* * TODO * MODIFIED HACK! * if celleditor's doSetFocus() * applies the value then the celleditor will turn null. * * see applyEditorValue() line 361. */ if(!isCellEditorActive()){ return true; } if (cellEditor.dependsOnExternalFocusListener()) { .... [/CODE] Reproducible: Always