/** * Creates and returns a preference store which combines the preference stores from the text tools * and which is read-only. * * @param javaTextTools the Java text tools * @return the combined read-only preference store * @since 3.0 */ private static final IPreferenceStore createPreferenceStore(JavaTextTools javaTextTools) { Assert.isNotNull(javaTextTools); IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore(); if (javaTextTools.getCorePreferenceStore() == null) return new ChainedPreferenceStore( new IPreferenceStore[] {javaTextTools.getPreferenceStore(), generalTextStore}); return new ChainedPreferenceStore( new IPreferenceStore[] { javaTextTools.getPreferenceStore(), new PreferencesAdapter(javaTextTools.getCorePreferenceStore()), generalTextStore }); }
/** * Returns the preference store used by this configuration to initialize the individual bits and * pieces. * * <p>Clients are not allowed to call this method if the new setup without text tools is in use. * * @return the preference store used to initialize this configuration * @see JavaSourceViewerConfiguration#JavaSourceViewerConfiguration(IColorManager, * IPreferenceStore, ITextEditor, String) * @since 2.0 * @deprecated As of 3.0 */ protected IPreferenceStore getPreferenceStore() { Assert.isTrue(!isNewSetup()); return fJavaTextTools.getPreferenceStore(); }