rkeen-siemens opened a new issue, #4156: URL: https://github.com/apache/netbeans/issues/4156
### Apache NetBeans version Apache NetBeans 13 ### What happened Given * A property with `canWrite` returning `false` * Displayed in the `OutlineView` using a `PropertyEditor` that supports a custom editor The renderer is not set to disabled to display the property as read-only. Editors that do not support a custom editor are rendered disabled. ### How to reproduce Create an `OutlineView` and display a read-only property using a renderer that supports a custom editor. ### Did this work correctly in an earlier version? No ### Operating System Linux ### JDK Eclipse Adoptium 11.0.14.1 ### Apache NetBeans packaging Apache NetBeans platform ### Anything else This happens all the time. The main property sheet gets the renderer is as follows: 1. Create the renderer (if needed) and reset its enabled state to true 2. In `RendererFactory.getRenderer`, set the enabled state based on the `canWrite` value of the property 3. Embed the renderer in a button panel (this shows the ... button) which resets its own enabled state to `true` which in turn sets the enabled state of the nested renderer to `true` 4. In `SheetTable.prepareRenderer`, set the enabled state again based on the `canWrite` value of the property When called from the `OutlineView`, it goes through the same steps except for the last one. The comparable place to set the enabled state of the renderer would be in `RendererPropertyDisplayer.getRenderer` or `paintComponent`. Adding the logic there to set it enabled based on the value of `canWrite()` would work, but it seems better to simply move the logic in `RendererFactory` after it is nested in the button panel and remove the logic from `SheetTable.prepareRenderer` that probably would no longer be needed. ### Are you willing to submit a pull request? No ### Code of Conduct Yes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
