@Override protected final IPreferenceStore doGetPreferenceStore() { return new ChainedPreferenceStore(new IPreferenceStore[] { internalStore, masterPreferenceStore }); }
private ChainedPreferenceStore createChainedPreferenceStore() { List<IPreferenceStore> stores= new ArrayList<>(2); stores.add(getCompareConfiguration().getPreferenceStore()); stores.add(EditorsUI.getPreferenceStore()); return new ChainedPreferenceStore(stores.toArray(new IPreferenceStore[stores.size()])); }
private ChainedPreferenceStore createChainedPreferenceStore(IJavaProject project) { ArrayList<IPreferenceStore> stores= new ArrayList<>(4); if (project != null) stores.add(new EclipsePreferencesAdapter(new ProjectScope(project.getProject()), JavaCore.PLUGIN_ID)); stores.add(JavaPlugin.getDefault().getPreferenceStore()); stores.add(new PreferencesAdapter(JavaPlugin.getJavaCorePluginPreferences())); stores.add(EditorsUI.getPreferenceStore()); return new ChainedPreferenceStore(stores.toArray(new IPreferenceStore[stores.size()])); }
private ChainedPreferenceStore createChainedPreferenceStore(IJavaProject project) { ArrayList<IPreferenceStore> stores= new ArrayList<>(4); if (project != null) stores.add(new EclipsePreferencesAdapter(new ProjectScope(project.getProject()), JavaCore.PLUGIN_ID)); stores.add(JavaPlugin.getDefault().getPreferenceStore()); stores.add(new PreferencesAdapter(JavaPlugin.getJavaCorePluginPreferences())); stores.add(EditorsUI.getPreferenceStore()); return new ChainedPreferenceStore(stores.toArray(new IPreferenceStore[stores.size()])); }
private ChainedPreferenceStore createChainedPreferenceStore(IJavaProject project) { ArrayList stores= new ArrayList(4); if (project != null) stores.add(new EclipsePreferencesAdapter(new ProjectScope(project.getProject()), JavaCore.PLUGIN_ID)); stores.add(JavaPlugin.getDefault().getPreferenceStore()); stores.add(new PreferencesAdapter(JavaCore.getPlugin().getPluginPreferences())); stores.add(EditorsUI.getPreferenceStore()); return new ChainedPreferenceStore((IPreferenceStore[]) stores.toArray(new IPreferenceStore[stores.size()])); }
public ChangeAwareSourceViewerConfiguration(PDESourcePage page, IColorManager manager) { this(page, manager, new ChainedPreferenceStore(new IPreferenceStore[] {PDEPlugin.getDefault().getPreferenceStore(), EditorsUI.getPreferenceStore() // general text editor store })); }
/** * 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 }); }
/** * 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 }); }
public IPreferenceStore getPreferenceStore() { lazyInitialize(); Activator activator = Activator.getDefault(); if (activator != null) return new ChainedPreferenceStore(new IPreferenceStore[] { getWritablePreferenceStore(), activator.getPreferenceStore(), EditorsUI.getPreferenceStore() }); return new ChainedPreferenceStore(new IPreferenceStore[] { getWritablePreferenceStore(), EditorsUI.getPreferenceStore() }); }
public IPreferenceStore getContextPreferenceStore(Object context) { lazyInitialize(); // may be null on shutdown Activator activator = Activator.getDefault(); if (activator != null) return new ChainedPreferenceStore(new IPreferenceStore[] { getWritablePreferenceStore(context), activator.getPreferenceStore(), EditorsUI.getPreferenceStore()}); return new ChainedPreferenceStore(new IPreferenceStore[] { getWritablePreferenceStore(context), EditorsUI.getPreferenceStore()}); }
@Override protected ChangeAwareSourceViewerConfiguration createSourceViewerConfiguration(IColorManager colorManager) { IPreferenceStore store = PreferenceConstants.getPreferenceStore(); IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore(); IPreferenceStore combinedStore = new ChainedPreferenceStore(new IPreferenceStore[] {store, generalTextStore}); this.setPreferenceStore(combinedStore); return new BuildSourceViewerConfiguration(colorManager, combinedStore, this); } }
public DisplayViewerConfiguration() { super(JDIDebugUIPlugin.getDefault().getJavaTextTools().getColorManager(), new ChainedPreferenceStore(new IPreferenceStore[] { PreferenceConstants.getPreferenceStore(), EditorsUI.getPreferenceStore()}), null, null); }
/** * Returns a combined preference store, this store is read-only. * * @return the combined preference store * * @since 3.0 */ public IPreferenceStore getCombinedPreferenceStore() { if (fCombinedPreferenceStore == null) { IPreferenceStore generalTextStore= EditorsUI.getPreferenceStore(); fCombinedPreferenceStore= new ChainedPreferenceStore(new IPreferenceStore[] { getPreferenceStore(), new PreferencesAdapter(getJavaCorePluginPreferences()), generalTextStore }); } return fCombinedPreferenceStore; }
/** * Returns a combined preference store, this store is read-only. * * @return the combined preference store * * @since 3.0 */ public IPreferenceStore getCombinedPreferenceStore() { if (fCombinedPreferenceStore == null) { IPreferenceStore generalTextStore= EditorsUI.getPreferenceStore(); fCombinedPreferenceStore= new ChainedPreferenceStore(new IPreferenceStore[] { getPreferenceStore(), new PreferencesAdapter(getJavaCorePluginPreferences()), generalTextStore }); } return fCombinedPreferenceStore; }
/** * Returns a combined preference store, this store is read-only. * * @return the combined preference store * * @since 3.0 */ public IPreferenceStore getCombinedPreferenceStore() { if (fCombinedPreferenceStore == null) { IPreferenceStore generalTextStore= EditorsUI.getPreferenceStore(); fCombinedPreferenceStore= new ChainedPreferenceStore(new IPreferenceStore[] { getPreferenceStore(), new PreferencesAdapter(JavaCore.getPlugin().getPluginPreferences()), generalTextStore }); } return fCombinedPreferenceStore; }
public JavaSnippetEditor() { super(); setDocumentProvider(JDIDebugUIPlugin.getDefault().getSnippetDocumentProvider()); IPreferenceStore store = new ChainedPreferenceStore(new IPreferenceStore[] { PreferenceConstants.getPreferenceStore(), EditorsUI.getPreferenceStore()}); setSourceViewerConfiguration(new JavaSnippetViewerConfiguration(JDIDebugUIPlugin.getDefault().getJavaTextTools(), store, this)); fSnippetStateListeners= new ArrayList(4); setPreferenceStore(store); setEditorContextMenuId("#JavaSnippetEditorContext"); //$NON-NLS-1$ setRulerContextMenuId("#JavaSnippetRulerContext"); //$NON-NLS-1$ }
public PDESourcePage(PDEFormEditor editor, String id, String title) { fId = id; initialize(editor); IPreferenceStore[] stores = new IPreferenceStore[2]; stores[0] = PDEPlugin.getDefault().getPreferenceStore(); stores[1] = EditorsUI.getPreferenceStore(); setPreferenceStore(new ChainedPreferenceStore(stores)); setRangeIndicator(new DefaultRangeIndicator()); if (isSelectionListener()) getEditor().getSite().getSelectionProvider().addSelectionChangedListener(this); }
private Control createPreviewer(Composite parent) { fPreviewViewer = new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); AntSourceViewerConfiguration configuration = new AntSourceViewerConfiguration(); fPreviewViewer.configure(configuration); fPreviewViewer.setEditable(false); Font font = JFaceResources.getFont(JFaceResources.TEXT_FONT); fPreviewViewer.getTextWidget().setFont(font); IPreferenceStore store = new ChainedPreferenceStore(new IPreferenceStore[] { getOverlayStore(), EditorsUI.getPreferenceStore() }); fPreviewerUpdater = new AntPreviewerUpdater(fPreviewViewer, configuration, store); String content = loadPreviewContentFromFile("SyntaxPreviewCode.txt"); //$NON-NLS-1$ IDocument document = new Document(content); new AntDocumentSetupParticipant().setup(document); fPreviewViewer.setDocument(document); return fPreviewViewer.getControl(); }
private Control createPreviewer(Composite parent) { fPreviewViewer = new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); AntSourceViewerConfiguration configuration = new AntSourceViewerConfiguration(); fPreviewViewer.configure(configuration); fPreviewViewer.setEditable(false); Font font = JFaceResources.getFont(JFaceResources.TEXT_FONT); fPreviewViewer.getTextWidget().setFont(font); IPreferenceStore store = new ChainedPreferenceStore(new IPreferenceStore[] { getOverlayStore(), EditorsUI.getPreferenceStore() }); fPreviewerUpdater = new AntPreviewerUpdater(fPreviewViewer, configuration, store); String content = loadPreviewContentFromFile("FormatPreviewCode.txt"); //$NON-NLS-1$ content = formatContent(content, store); IDocument document = new Document(content); new AntDocumentSetupParticipant().setup(document); fPreviewViewer.setDocument(document); return fPreviewViewer.getControl(); }
private Control createPreviewer(Composite parent) { IPreferenceStore generalTextStore= EditorsUI.getPreferenceStore(); IPreferenceStore store= new ChainedPreferenceStore(new IPreferenceStore[] { getPreferenceStore(), new PreferencesAdapter(createTemporaryCorePreferenceStore()), generalTextStore }); fPreviewViewer= new JavaSourceViewer(parent, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, store); SimpleJavaSourceViewerConfiguration configuration= new SimpleJavaSourceViewerConfiguration(fColorManager, store, null, IJavaPartitions.JAVA_PARTITIONING, false); fPreviewViewer.configure(configuration); // fake 1.5 source to get 1.5 features right. configuration.handlePropertyChangeEvent(new PropertyChangeEvent(this, JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4, JavaCore.VERSION_1_5)); Font font= JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT); fPreviewViewer.getTextWidget().setFont(font); new JavaSourcePreviewerUpdater(fPreviewViewer, configuration, store); fPreviewViewer.setEditable(false); String content= loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); //$NON-NLS-1$ IDocument document= new Document(content); JavaPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(document, IJavaPartitions.JAVA_PARTITIONING); fPreviewViewer.setDocument(document); installSemanticHighlighting(); return fPreviewViewer.getControl(); }