Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324927

Summary: Do not serialize the editor configuration at all
Product: z_Archived Reporter: Florian Thienel <florian>
Component: MylynAssignee: Holger Voormann <eclipse>
Status: CLOSED FIXED QA Contact: David Williams <david_williams>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Florian Thienel CLA 2010-09-10 03:51:14 EDT
Is:
A editor configuration for a document type (either a Eclipse plug-in using the Vex extension points, or a Vex Plug-in Project in the workspace) consists of a DTD and several (at least one) CSS files. When these artifacts were successfully parsed, this state is serialized to a file named 'vex-config.ser' (either in the vex.ui plug-in's state location or within the Vex Plug-in Project in the workspace) using Java serialization. This step is done to save the time for parsing the artifact when the information is needed the next time.

This procedure has some disadvantages:
1. All classes that are part of the editor configuration (i.e. the grammar model and the styling model) must be serializable. It's a lot effort to maintain this and it makes it difficult to use 3rd party libraries.

2. We are in fact caching the configuration information. Caches are bad! And stored caches are even worse! e.g. To get rid of the serialized configuration provided by an Eclipse plug-in, you have to delete the *.ser file manually from the vex.ui plug-in's state location.

3. Java serialization is IMHO at least a bad smell.

4. Parsing the DTD and CSS files is fast.

Should:
- ConfigRegistry should read the configuration artifacts each time needed. 
- A VexEditor instance should fetch it's configuration once when it is initialized and hold it.

If the configuration artifact changed, the user can simply reopen the editor and use the updated configuration.
Comment 1 Florian Thienel CLA 2010-10-19 17:14:11 EDT
Holger: would be nice if you could look over my changes, especially in o.e.wst.xml.vex.ui.internal.config
Comment 2 Florian Thienel CLA 2011-06-02 05:23:44 EDT
Closing resolved bugs.
Comment 3 Florian Thienel CLA 2011-11-09 17:37:35 EST
Moved to Mylyn Docs Vex.