Search in sources :

Example 6 with OverlayKey

use of org.eclipse.ui.internal.editors.text.OverlayPreferenceStore.OverlayKey in project eclipse.platform.text by eclipse.

the class HyperlinkDetectorsConfigurationBlock method createOverlayStoreKeys.

private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys() {
    ArrayList<OverlayKey> overlayKeys = new ArrayList<>();
    for (int i = 0; i < fHyperlinkDetectorDescriptors.length; i++) {
        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, fHyperlinkDetectorDescriptors[i].getId()));
        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, fHyperlinkDetectorDescriptors[i].getId() + HyperlinkDetectorDescriptor.STATE_MASK_POSTFIX));
    }
    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER));
    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINKS_ENABLED));
    OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
    overlayKeys.toArray(keys);
    return keys;
}
Also used : OverlayKey(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore.OverlayKey) OverlayKey(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore.OverlayKey) ArrayList(java.util.ArrayList) Point(org.eclipse.swt.graphics.Point)

Example 7 with OverlayKey

use of org.eclipse.ui.internal.editors.text.OverlayPreferenceStore.OverlayKey in project eclipse.platform.text by eclipse.

the class LinkedModeConfigurationBlock method createOverlayStoreKeys.

private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys(MarkerAnnotationPreferences preferences) {
    ArrayList<OverlayKey> overlayKeys = new ArrayList<>();
    Iterator<AnnotationPreference> e = preferences.getAnnotationPreferences().iterator();
    while (e.hasNext()) {
        AnnotationPreference info = e.next();
        if (isLinkedModeAnnotation(info)) {
            overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, info.getColorPreferenceKey()));
            overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getTextPreferenceKey()));
            overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, info.getTextStylePreferenceKey()));
            overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getHighlightPreferenceKey()));
        }
    }
    OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
    overlayKeys.toArray(keys);
    return keys;
}
Also used : OverlayKey(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore.OverlayKey) OverlayKey(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore.OverlayKey) ArrayList(java.util.ArrayList) AnnotationPreference(org.eclipse.ui.texteditor.AnnotationPreference)

Aggregations

ArrayList (java.util.ArrayList)7 OverlayKey (org.eclipse.ui.internal.editors.text.OverlayPreferenceStore.OverlayKey)7 AnnotationPreference (org.eclipse.ui.texteditor.AnnotationPreference)3 Point (org.eclipse.swt.graphics.Point)1