public void dispose() { OverlayPreferenceStore store= getPreferenceStore(); if (store != null) { store.stop(); } }
@Override public void dispose() { OverlayPreferenceStore store= getPreferenceStore(); if (store != null) { store.stop(); } }
private void handleAnnotationListSelection() { ListItem item= getSelectedItem(); RGB rgb= PreferenceConverter.getColor(getPreferenceStore(), item.colorKey); fAnnotationForegroundColorEditor.setColorValue(rgb); boolean highlight= item.highlightKey == null ? false : getPreferenceStore().getBoolean(item.highlightKey); boolean showInText = item.textKey == null ? false : getPreferenceStore().getBoolean(item.textKey); fShowInTextCheckBox.setSelection(showInText || highlight); updateDecorationViewer(item, true); }
private void handleAnnotationListSelection() { ListItem item= getSelectedItem(); RGB rgb= PreferenceConverter.getColor(getPreferenceStore(), item.colorKey); fAnnotationForegroundColorEditor.setColorValue(rgb); boolean highlight= item.highlightKey == null ? false : getPreferenceStore().getBoolean(item.highlightKey); boolean showInText = item.textKey == null ? false : getPreferenceStore().getBoolean(item.textKey); fShowInTextCheckBox.setSelection(showInText || highlight); updateDecorationViewer(item, true); }
private void updateDecorationViewer(ListItem item, boolean changed) { // decoration selection: if the checkbox is enabled, there is // only one case where the combo is not enabled: if both the highlight and textStyle keys are null final boolean enabled= fShowInTextCheckBox.getSelection() && !(item.highlightKey == null && item.textStyleKey == null); fDecorationViewer.getControl().setEnabled(enabled); if (changed) { String[] selection= null; ArrayList<String[]> list= new ArrayList<>(); list.addAll(item.validStyles); if (getPreferenceStore().getBoolean(item.highlightKey)) selection= HIGHLIGHT; // set selection if (selection == null) { String val= getPreferenceStore().getString(item.textStyleKey); for (Iterator<String[]> iter= list.iterator(); iter.hasNext();) { String[] elem= iter.next(); if (elem[1].equals(val)) { selection= elem; break; } } } fDecorationViewer.setInput(list.toArray(new Object[list.size()])); if (selection == null) selection= list.get(0); fDecorationViewer.setSelection(new StructuredSelection((Object) selection), true); } }
if (getPreferenceStore().getBoolean(item.highlightKey)) selection= HIGHLIGHT; String val= getPreferenceStore().getString(item.textStyleKey); for (Iterator iter= list.iterator(); iter.hasNext();) { String[] elem= (String[]) iter.next();
@Override public void performDefaults() { getPreferenceStore().loadDefaults(); /* * Only call super after updating fShowInTextCheckBox, so that * the master-slave dependencies get properly updated. */ handleAnnotationListSelection(); initializeFields(); }
public void performDefaults() { getPreferenceStore().loadDefaults(); /* * Only call super after updating fShowInTextCheckBox, so that * the master-slave dependencies get properly updated. */ handleAnnotationListSelection(); initializeFields(); }
public LinkedModeConfigurationBlock(OverlayPreferenceStore store) { fStore= store; final MarkerAnnotationPreferences prefs= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); getPreferenceStore().addKeys(createOverlayStoreKeys(prefs)); fListModel= createAnnotationTypeListModel(prefs); }
public LinkedModeConfigurationBlock(OverlayPreferenceStore store) { fStore= store; final MarkerAnnotationPreferences prefs= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); getPreferenceStore().addKeys(createOverlayStoreKeys(prefs)); fListModel= createAnnotationTypeListModel(prefs); }
OverlayPreferenceStore store= getPreferenceStore(); store.load(); store.start();
OverlayPreferenceStore store= getPreferenceStore(); store.load(); store.start();
@Override public void performOk() { getPreferenceStore().propagate(); try { Platform.getPreferencesService().getRootNode().node(InstanceScope.SCOPE).node(EditorsUI.PLUGIN_ID).flush(); } catch (BackingStoreException e) { EditorsPlugin.log(e); } }
public void performOk() { getPreferenceStore().propagate(); try { Platform.getPreferencesService().getRootNode().node(InstanceScope.SCOPE).node(EditorsUI.PLUGIN_ID).flush(); } catch (BackingStoreException e) { EditorsPlugin.log(e); } }