Skip to content

Address Snippet issues#24

Open
andrew-tram wants to merge 1 commit into
eclipse-wtp-common:masterfrom
andrew-tram:Address_Snippet_issues
Open

Address Snippet issues#24
andrew-tram wants to merge 1 commit into
eclipse-wtp-common:masterfrom
andrew-tram:Address_Snippet_issues

Conversation

@andrew-tram
Copy link
Copy Markdown
Contributor

SnippetsPlugin was missing a stop() method, so snippets were never saved when Eclipse closed normally. UserModelDumper opened a FileOutputStream to write user.xml but never closed it (the close call was commented out), leaving the file at 0 bytes on exit.

The deeper persistence bug was in SnippetManager.getPaletteRoot(), which created the palette root without calling connect(). This meant the manager was never notified when snippets were added (e.g. via import), so saveDefinitions() always wrote stale data. Related to this, SnippetsView.dispose() was calling disconnect() on a field that was always null.

The Import button in the Customize dialog was always greyed out because it was initialized disabled and only enabled on selection. So fixed to be enabled by default. Finally, AccessibleTableViewer was unconditionally casting the label provider to ILabelProvider before checking its type, causing a crash due to OSGi classloader isolation. org.eclipse.jface was also added as an explicit Require-Bundle dependency since relying on it transitively doesn't guarantee classloader sharing.

@andrew-tram
Copy link
Copy Markdown
Contributor Author

To address - #14

@andrew-tram
Copy link
Copy Markdown
Contributor Author

@nitind , I'm not able to assign reviewers, but letting you know it is ready whenever you have a moment. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant