Bug 101077 - overview ruler is not working with a different preference store
Summary: overview ruler is not working with a different preference store
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2005-06-21 11:52 EDT by Fabio Zadrozny CLA
Modified: 2007-06-22 10:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Zadrozny CLA 2005-06-21 11:52:53 EDT
Hi, I'm trying to make an overview ruler work in a different preference store
(in pydev).

I've added a page for all the optios and they all seem to work fine with the new
preference store (show line numbers, show print margin, colors, etc), but when
it comes down to the overview ruler, it appears and dissapears, but does not add
any generated annotations, such as search results (if I dont use another
preference store, it works).

Thanks,

Fabio Zadrozny
Comment 1 Dani Megert CLA 2005-06-21 13:23:09 EDT
Can you provide the code?
Comment 2 Fabio Zadrozny CLA 2005-06-21 13:51:41 EDT
Short version:

public class PyEdit extends TextEditor {

protected void initializeEditor() {
   super.initializeEditor();    	
   this.setPreferenceStore(PydevPlugin.getDefault().getPreferenceStore());
}
}

	
prefs.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER,
StringConverter.asString(DEFAULT_EDITOR_OVERVIEW_RULER));

(it works for showing / hiding the color scale)

the long version would be getting pydev (tag 0.9.4): http://pydev.sf.net
and checking PyEdit, PyEditProjection, PySourceViewer and PydevPrefs (I could
post it, but I dont think all that is needed)

Also, when I comment the line
this.setPreferenceStore(PydevPlugin.getDefault().getPreferenceStore()); it works.

p.s. the IVerticalRuler always works


Comment 3 Dani Megert CLA 2005-06-21 15:26:15 EDT
Annotation prefs are provided via general preference store. Try to create a
combined preference store, something like:
IPreferenceStore generalTextStore= EditorsUI.getPreferenceStore(); 
combinedStore= new ChainedPreferenceStore(new IPreferenceStore[] { yourStore,
generalTextStore });
Comment 4 Fabio Zadrozny CLA 2005-06-22 20:21:59 EDT
Hi, just wanted to say that it worked...

thanks a lot!!

Cheers,

Fabio
Comment 5 Dani Megert CLA 2007-06-22 09:59:24 EDT
Get rid of deprecated state.
Comment 6 Dani Megert CLA 2007-06-22 10:04:38 EDT
.