This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Add support for child nodes to MimeLookup Preferences | ||
---|---|---|---|
Product: | editor | Reporter: | Vitezslav Stejskal <vstejskal> |
Component: | Settings | Assignee: | Milutin Kristofic <mkristofic> |
Status: | NEW --- | ||
Severity: | blocker | CC: | dstrupl, issues, jlahoda |
Priority: | P2 | Keywords: | API |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 179566, 186628 | ||
Attachments: | keep proposal in the bug |
Description
Vitezslav Stejskal
2008-08-20 12:55:31 UTC
This is ENH needed by CDN team as well. C/C++ Formatting supports styling but we can not use MimeLookup preferences do to lack of this functionality. Probably this issue is also the blocker, why we can not add "Formatting" into our project properties Do we plan to do this? Is it still needed? David, it's needed. We can not implement per-project formatting. The file where this should be implemented is here: editor.settings.storage/src/org/netbeans/modules/editor/settings/storage/preferences/PreferencesImpl.java Created attachment 131712 [details]
keep proposal in the bug
Hi Vladimir,
I did a quick experiment to see what difficulties we will likely encounter while trying to fix #144579. I am attaching my current version (see below for the list of problems). I wonder if there is a way to quickly test it in your (C/C++ Formatting) usecase, to check if this is what you need. All I have is a unit test and a quick manual test inside the IDE.
The current patch piggy backs on the profile support (as there are no profiles for Preferences) - I am not sure if abusing profiles for nested Preferences nodes will really work, but works so far. The two biggest problems I see right now are:
1. cannot find out what are the sub-nodes of a Preferences node. To overcome this, each Preferences node keeps the list of its children in a property, but that is very ugly (and not 100% compatible).
2. related to that - when a preferences node is deleted, all its properties are deleted, but the .xml file with the settings remains on the disk.
Thanks,
Jan
(In reply to comment #5) > I did a quick experiment to see what difficulties we will likely encounter > while trying to fix #144579. I am attaching my current version (see below for > the list of problems). I wonder if there is a way to quickly test it in your > (C/C++ Formatting) usecase, to check if this is what you need. All I have is a > unit test and a quick manual test inside the IDE. I got an assertion: SEVERE [global] java.lang.AssertionError: The parameter profile must not be null at org.netbeans.modules.editor.settings.storage.StorageImpl.load(StorageImpl.java:107) at org.netbeans.modules.editor.settings.storage.api.EditorSettingsStorage.load(EditorSettingsStorage.java:95) at org.netbeans.modules.options.indentation.FormattingPanelController.applyChanges(FormattingPanelController.java:154) at org.netbeans.modules.options.TabbedController.applyChanges(TabbedController.java:130) at org.netbeans.modules.options.CategoryModel$Category.applyChanges(CategoryModel.java:396) at org.netbeans.modules.options.CategoryModel$Category.access$1000(CategoryModel.java:321) at org.netbeans.modules.options.CategoryModel.save(CategoryModel.java:219) at org.netbeans.modules.options.OptionsPanel.save(OptionsPanel.java:292) at org.netbeans.modules.options.OptionsDisplayerImpl$OptionsPanelListener.actionPerformed(OptionsDisplayerImpl.java:441) at org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:1384) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.awt.EventQueue$3.run(EventQueue.java:686) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:702) at java.awt.EventQueue$4.run(EventQueue.java:700) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:699) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) Please, fix assertion. |