{"record":{"id":"5a30621947ab5b74","repo":"NationalSecurityAgency/ghidra","slug":"cell-is-not-editable-5a3062","errorCode":null,"errorMessage":"Cell is not editable","messagePattern":"Cell is not editable","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/ProposedUtils/src/main/java/docking/widgets/table/EnumeratedTableColumn.java","lineNumber":61,"sourceCode":"\t * @return the value\n\t */\n\tpublic Object getValueOf(R row);\n\n\t/**\n\t * Get the name of this column\n\t * \n\t * @return the name\n\t */\n\tpublic String getHeader();\n\n\t/**\n\t * Get the value of this column for the given row\n\t * \n\t * @param row the row\n\t * @param value the new value\n\t */\n\tdefault public void setValueOf(R row, Object value) {\n\t\tthrow new UnsupportedOperationException(\"Cell is not editable\");\n\t}\n\n\t/**\n\t * Check if this column can be modified for the given row\n\t * \n\t * @param row the row\n\t * @return true if editable\n\t */\n\tdefault public boolean isEditable(R row) {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Check if this column can be sorted\n\t * \n\t * <p>\n\t * TODO: Either this should be implemented as ported to {@link GDynamicColumnTableModel}, or\n\t * removed.","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/ProposedUtils/src/main/java/docking/widgets/table/EnumeratedTableColumn.java#L43-L79","documentation":"Default implementation of EnumeratedTableColumn.setValueOf(R, Object). Mirrors error 562 for the simpler EnumeratedTableColumn interface: columns are non-editable unless isEditable(R) is overridden to return true, and when editing is enabled the subclass must also override setValueOf. The default throws to signal an incomplete edit implementation.","triggerScenarios":"An enum-based EnumeratedTableColumn overrides isEditable(row) to true but does not override setValueOf(row, value). The table invokes setValueOf when a user commits an edit in that cell.","commonSituations":"Prototyping an editable enumerated table column; toggling editability on a column modeled after a read-only one without adding the setter; framework upgrades where the editable contract was tightened.","solutions":["Override setValueOf(R row, Object value) in the enum constant/class so the edit is applied to the row.","Leave isEditable returning false if the column must remain read-only.","Pair every isEditable()==true column with a tested setValueOf override."],"exampleFix":"// before\nADDRESS {\n  public Object getValueOf(Row r) { return r.getAddress(); }\n  public boolean isEditable(Row r) { return true; } // no setValueOf\n};\n\n// after\nADDRESS {\n  public Object getValueOf(Row r) { return r.getAddress(); }\n  public boolean isEditable(Row r) { return true; }\n  public void setValueOf(Row r, Object value) { r.setAddress((Address) value); }\n};","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"if (col.isEditable(row)) {\n  // only call setValueOf if isEditable is true AND the column overrides setValueOf\n}","tryCatchPattern":"try {\n  col.setValueOf(row, value);\n} catch (UnsupportedOperationException e) {\n  if (\"Cell is not editable\".equals(e.getMessage())) {\n    // no setter implemented; ignore\n  } else throw e;\n}","preventionTips":["Override setValueOf wherever isEditable returns true.","Keep editing and its setter implemented as a pair.","Test edit commits for every editable enumerated column."],"tags":["ghidra","table-column","editing","contract-violation"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}