@SuppressWarnings("unchecked") @Override public <T> T getAdapter(Class<T> adapter) { if (IGotoMarker.class.equals(adapter)) return (T) fGotoMarkerAdapter; if (IAnnotationAccess.class.equals(adapter)) return (T) getAnnotationAccess(); if (adapter == IShowInSource.class) { return (T) new IShowInSource() { @Override public ShowInContext getShowInContext() { ISelection selection= null; ISelectionProvider selectionProvider= getSelectionProvider(); if (selectionProvider != null) selection= selectionProvider.getSelection(); return new ShowInContext(getEditorInput(), selection); } }; } if (IRevisionRulerColumn.class.equals(adapter)) { if (fLineNumberRulerColumn instanceof IRevisionRulerColumn) return (T) fLineNumberRulerColumn; } if (MarkerAnnotationPreferences.class.equals(adapter)) return (T) EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); return super.getAdapter(adapter); }
public AnnotationsConfigurationBlock(OverlayPreferenceStore store) { Assert.isNotNull(store); MarkerAnnotationPreferences markerAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); fStore= store; fStore.addKeys(createOverlayStoreKeys(markerAnnotationPreferences)); fListModel= createAnnotationTypeListModel(markerAnnotationPreferences); }
public AnnotationsConfigurationBlock(OverlayPreferenceStore store) { Assert.isNotNull(store); MarkerAnnotationPreferences markerAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); fStore= store; fStore.addKeys(createOverlayStoreKeys(markerAnnotationPreferences)); fListModel= createAnnotationTypeListModel(markerAnnotationPreferences); }
public QuickDiffConfigurationBlock(OverlayPreferenceStore store) { Assert.isNotNull(store); fStore= store; MarkerAnnotationPreferences markerAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); fStore.addKeys(createOverlayStoreKeys(markerAnnotationPreferences)); fQuickDiffModel= createQuickDiffModel(markerAnnotationPreferences); fQuickDiffProviderListModel= createQuickDiffReferenceListModel(); }
public QuickDiffConfigurationBlock(OverlayPreferenceStore store) { Assert.isNotNull(store); fStore= store; MarkerAnnotationPreferences markerAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); fStore.addKeys(createOverlayStoreKeys(markerAnnotationPreferences)); fQuickDiffModel= createQuickDiffModel(markerAnnotationPreferences); fQuickDiffProviderListModel= createQuickDiffReferenceListModel(); }
/** * Creates actions using marker * annotation preferences. * * @return the navigation enablement actions */ private IAction[] getActionsFromDescriptors() { MarkerAnnotationPreferences fMarkerAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); SortedSet containers= new TreeSet(); Iterator iter= fMarkerAnnotationPreferences.getAnnotationPreferences().iterator(); while (iter.hasNext()) { AnnotationPreference preference= (AnnotationPreference)iter.next(); String key= preference.getShowInNextPrevDropdownToolbarActionKey(); if (key != null && fStore.getBoolean(key)) { String preferenceKey= getPreferenceKey(preference); /* * Fixes bug 41689 * This code can be simplified if we decide that * we don't allow to use different settings for go to * previous and go to next annotation. */ preferenceKey= preference.getIsGoToNextNavigationTargetKey(); if (preferenceKey != null) containers.add(new NavigationEnablementAction(preference.getPreferenceLabel(), fStore, preferenceKey)); } } return (IAction[]) containers.toArray(new Action[containers.size()]); }
/** * Creates actions using marker * annotation preferences. * * @return the navigation enablement actions */ private IAction[] getActionsFromDescriptors() { MarkerAnnotationPreferences fMarkerAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); SortedSet<NavigationEnablementAction> containers= new TreeSet<>(); Iterator<AnnotationPreference> iter= fMarkerAnnotationPreferences.getAnnotationPreferences().iterator(); while (iter.hasNext()) { AnnotationPreference preference= iter.next(); String key= preference.getShowInNextPrevDropdownToolbarActionKey(); if (key != null && fStore.getBoolean(key)) { String preferenceKey= getPreferenceKey(preference); /* * Fixes bug 41689 * This code can be simplified if we decide that * we don't allow to use different settings for go to * previous and go to next annotation. */ preferenceKey= preference.getIsGoToNextNavigationTargetKey(); if (preferenceKey != null) containers.add(new NavigationEnablementAction(preference.getPreferenceLabel(), fStore, preferenceKey)); } } return containers.toArray(new Action[containers.size()]); }
/** * Creates a new text editor. */ public AbstractDecoratedTextEditor() { super(); fAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); setRangeIndicator(new DefaultRangeIndicator()); initializeKeyBindingScopes(); initializeEditor(); }
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); }
/** * Creates a new text editor. * * @see #initializeEditor() * @see #initializeKeyBindingScopes() */ public AbstractDecoratedTextEditor() { super(); fAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); setRangeIndicator(new DefaultRangeIndicator()); initializeKeyBindingScopes(); initializeEditor(); }
private void initialize() { synchronized (EditorsPlugin.getDefault()) { if (!EditorsPlugin.getDefault().isMarkerAnnotationPreferencesInitialized()) EditorsPlugin.getDefault().setMarkerAnnotationPreferences(new MarkerAnnotationPreferences(true)); } MarkerAnnotationPreferences sharedPrefs= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); fFragments= cloneAnnotationPreferences(sharedPrefs.fFragments); fPreferences= cloneAnnotationPreferences(sharedPrefs.fPreferences); }
private void initialize() { synchronized (EditorsPlugin.getDefault()) { if (!EditorsPlugin.getDefault().isMarkerAnnotationPreferencesInitialized()) EditorsPlugin.getDefault().setMarkerAnnotationPreferences(new MarkerAnnotationPreferences(true)); } MarkerAnnotationPreferences sharedPrefs= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); fFragments= cloneAnnotationPreferences(sharedPrefs.fFragments); fPreferences= cloneAnnotationPreferences(sharedPrefs.fPreferences); }
MarkerAnnotationPreferences preferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); Iterator e= preferences.getAnnotationPreferences().iterator(); while (e.hasNext()) {
MarkerAnnotationPreferences preferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); Iterator<AnnotationPreference> e= preferences.getAnnotationPreferences().iterator(); while (e.hasNext()) {
boolean ignoreQuickDiffPrefPage= store.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.USE_QUICK_DIFF_PREFERENCE_PAGE); MarkerAnnotationPreferences preferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); Iterator e= preferences.getAnnotationPreferences().iterator(); while (e.hasNext()) {
boolean ignoreQuickDiffPrefPage= store.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.USE_QUICK_DIFF_PREFERENCE_PAGE); MarkerAnnotationPreferences preferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); Iterator<AnnotationPreference> e= preferences.getAnnotationPreferences().iterator(); while (e.hasNext()) {
MarkerAnnotationPreferences preferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); Iterator e= preferences.getAnnotationPreferences().iterator(); while (e.hasNext()) {
MarkerAnnotationPreferences preferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences(); Iterator<AnnotationPreference> e= preferences.getAnnotationPreferences().iterator(); while (e.hasNext()) {