Bug 298000 - PHP folding preference page tampers with SSE preference value
Summary: PHP folding preference page tampers with SSE preference value
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 561347
Blocks:
  Show dependency tree
 
Reported: 2009-12-16 15:05 EST by Nitin Dahyabhai CLA
Modified: 2020-05-14 10:16 EDT (History)
3 users (show)

See Also:


Attachments
first draft, still needs more refactoring (10.56 KB, patch)
2020-02-17 22:53 EST, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nitin Dahyabhai CLA 2009-12-16 15:05:16 EST
org.eclipse.php.internal.ui.preferences.FoldingConfigurationBlock#performOk() changes the SSE UI folding preference.  This is not meant for other plug-ins to modify.  A request to make the setting variable by content type would have been preferred.
Comment 1 Dawid Pakula CLA 2020-01-11 14:16:19 EST
It's not possible now. SSE control folding by global settings in General -> Structured Text Editors. 

1. StructuredTextEditor have hardcoded combined preference store
2. FoldingActionGroup is also hardcoded to SSE preferences only

Because I currently working on reducing StructuredTextEditor overrides via bug 558940 (our editor in previous release had more code) I'll be happy if:

1. Could we install own preference store in "StructuredTextEditor.createCombinedPreferenceStore"
2. Use same preference store in FoldingActionGroup
Comment 2 Nitin Dahyabhai CLA 2020-01-21 00:28:13 EST
Let me see if there's something we can delegate using the at-runtime configuration targets.
Comment 3 Nitin Dahyabhai CLA 2020-02-17 22:53:08 EST
Created attachment 281842 [details]
first draft, still needs more refactoring

Attaching an in-progress patch of how I think this could work in the future. The preference page itself needs to be broken out into separate Appearance and Hovers pages that can be publicly referenced and reused, and some thought put into how to intelligently pull default values, but then this should aim to be as simple as parameterizing the preference node name on both the org.eclipse.ui.editors and org.eclipse.ui.preferencePage extensions. That, or borrow the way annotation preferences work. Anyway, just looking for feedback on the approach, particularly to the sample changes made in the plugin.xml of an editor plug-in.
Comment 4 Dawid Pakula CLA 2020-02-18 10:55:40 EST
(In reply to Nitin Dahyabhai from comment #3)
> Created attachment 281842 [details]
> first draft, still needs more refactoring

Amazing, looks interesting. It open opportunity to personalize PHP Editor in more civilized way ;)

As I mentioned before, FoldingActionGroup will also require refactoring similar to StructuredTextEditor.createCombinedPreferenceStore
Comment 5 Nitin Dahyabhai CLA 2020-03-30 16:23:34 EDT
(In reply to Dawid Pakula from comment #4)

Refactored and in for M1.
Comment 6 Eclipse Genie CLA 2020-04-22 08:25:59 EDT
New Gerrit change created: https://git.eclipse.org/r/161372
Comment 8 Dawid Pakula CLA 2020-04-23 02:55:58 EDT
Fixed in HEAD. Thank you for cooperation ;)
Comment 9 Jonh Doe CLA 2020-05-01 07:16:45 EDT
How I can Install PDT after fix this bug?

Commit: https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=fc0aa936d0b02e39f6a0f1e15abda79ddff9e31c

It is need org.eclipse.wst.sse.ui 1.7.0 which not exists even in Eclipse 2020-06. Here 1.6.3 only.
Comment 10 Dawid Pakula CLA 2020-05-01 07:18:15 EDT
Add this repository to eclipse: https://download.eclipse.org/webtools/downloads/drops/R3.18.0/I-latest/repository/
Comment 11 Jonh Doe CLA 2020-05-01 07:58:51 EDT
Thank you. Worked.