1 11 package org.eclipse.ui.texteditor; 12 13 import org.eclipse.swt.graphics.RGB; 14 15 import org.eclipse.core.runtime.IConfigurationElement; 16 17 import org.eclipse.jface.resource.ImageDescriptor; 18 19 30 class ReadOnlyAnnotationPreference extends AnnotationPreference { 31 32 private boolean fIsReadOnly; 33 34 public void merge(AnnotationPreference preference) { 35 if (fIsReadOnly) 36 throw new UnsupportedOperationException (); 37 super.merge(preference); 38 } 39 40 public void setAnnotationImageProvider(IAnnotationImageProvider provider) { 41 if (fIsReadOnly) 42 throw new UnsupportedOperationException (); 43 super.setAnnotationImageProvider(provider); 44 } 45 46 public void setAnnotationImageProviderData(IConfigurationElement configurationElement, String annotationImageProviderAttribute) { 47 if (fIsReadOnly) 48 throw new UnsupportedOperationException (); 49 super.setAnnotationImageProviderData(configurationElement, 50 annotationImageProviderAttribute); 51 } 52 53 public void setAnnotationType(Object annotationType) { 54 if (fIsReadOnly) 55 throw new UnsupportedOperationException (); 56 super.setAnnotationType(annotationType); 57 } 58 59 public void setColorPreferenceKey(String colorKey) { 60 if (fIsReadOnly) 61 throw new UnsupportedOperationException (); 62 super.setColorPreferenceKey(colorKey); 63 } 64 65 public void setColorPreferenceValue(RGB colorValue) { 66 if (fIsReadOnly) 67 throw new UnsupportedOperationException (); 68 super.setColorPreferenceValue(colorValue); 69 } 70 71 public void setContributesToHeader(boolean contributesToHeader) { 72 if (fIsReadOnly) 73 throw new UnsupportedOperationException (); 74 super.setContributesToHeader(contributesToHeader); 75 } 76 77 public void setHighlightPreferenceKey(String highlightKey) { 78 if (fIsReadOnly) 79 throw new UnsupportedOperationException (); 80 super.setHighlightPreferenceKey(highlightKey); 81 } 82 83 public void setHighlightPreferenceValue(boolean highlightValue) { 84 if (fIsReadOnly) 85 throw new UnsupportedOperationException (); 86 super.setHighlightPreferenceValue(highlightValue); 87 } 88 89 public void setImageDescriptor(ImageDescriptor descriptor) { 90 if (fIsReadOnly) 91 throw new UnsupportedOperationException (); 92 super.setImageDescriptor(descriptor); 93 } 94 95 public void setIncludeOnPreferencePage(boolean includeOnPreferencePage) { 96 if (fIsReadOnly) 97 throw new UnsupportedOperationException (); 98 super.setIncludeOnPreferencePage(includeOnPreferencePage); 99 } 100 101 public void setIsGoToNextNavigationTarget(boolean isGoToNextNavigationTarget) { 102 if (fIsReadOnly) 103 throw new UnsupportedOperationException (); 104 super.setIsGoToNextNavigationTarget(isGoToNextNavigationTarget); 105 } 106 107 public void setIsGoToNextNavigationTargetKey(String isGoToNextNavigationTargetKey) { 108 if (fIsReadOnly) 109 throw new UnsupportedOperationException (); 110 super.setIsGoToNextNavigationTargetKey(isGoToNextNavigationTargetKey); 111 } 112 113 public void setIsGoToPreviousNavigationTarget(boolean isGoToPreviousNavigationTarget) { 114 if (fIsReadOnly) 115 throw new UnsupportedOperationException (); 116 super.setIsGoToPreviousNavigationTarget(isGoToPreviousNavigationTarget); 117 } 118 119 public void setIsGoToPreviousNavigationTargetKey(String isGoToPreviousNavigationTargetKey) { 120 if (fIsReadOnly) 121 throw new UnsupportedOperationException (); 122 super.setIsGoToPreviousNavigationTargetKey(isGoToPreviousNavigationTargetKey); 123 } 124 125 public void setMarkerType(String markerType) { 126 if (fIsReadOnly) 127 throw new UnsupportedOperationException (); 128 super.setMarkerType(markerType); 129 } 130 131 public void setOverviewRulerPreferenceKey(String overviewRulerKey) { 132 if (fIsReadOnly) 133 throw new UnsupportedOperationException (); 134 super.setOverviewRulerPreferenceKey(overviewRulerKey); 135 } 136 137 public void setOverviewRulerPreferenceValue(boolean overviewRulerValue) { 138 if (fIsReadOnly) 139 throw new UnsupportedOperationException (); 140 super.setOverviewRulerPreferenceValue(overviewRulerValue); 141 } 142 143 public void setPreferenceLabel(String label) { 144 if (fIsReadOnly) 145 throw new UnsupportedOperationException (); 146 super.setPreferenceLabel(label); 147 } 148 149 public void setPresentationLayer(int presentationLayer) { 150 if (fIsReadOnly) 151 throw new UnsupportedOperationException (); 152 super.setPresentationLayer(presentationLayer); 153 } 154 155 public void setQuickFixImageDescriptor(ImageDescriptor descriptor) { 156 if (fIsReadOnly) 157 throw new UnsupportedOperationException (); 158 super.setQuickFixImageDescriptor(descriptor); 159 } 160 161 public void setSeverity(int severity) { 162 if (fIsReadOnly) 163 throw new UnsupportedOperationException (); 164 super.setSeverity(severity); 165 } 166 167 public void setShowInNextPrevDropdownToolbarAction(boolean showInNextPrevDropdownToolbarAction) { 168 if (fIsReadOnly) 169 throw new UnsupportedOperationException (); 170 super.setShowInNextPrevDropdownToolbarAction(showInNextPrevDropdownToolbarAction); 171 } 172 173 public void setShowInNextPrevDropdownToolbarActionKey(String showInNextPrevDropdownToolbarActionKey) { 174 if (fIsReadOnly) 175 throw new UnsupportedOperationException (); 176 super.setShowInNextPrevDropdownToolbarActionKey(showInNextPrevDropdownToolbarActionKey); 177 } 178 179 public void setSymbolicImageName(String symbolicImageName) { 180 if (fIsReadOnly) 181 throw new UnsupportedOperationException (); 182 super.setSymbolicImageName(symbolicImageName); 183 } 184 185 public void setTextPreferenceKey(String textKey) { 186 if (fIsReadOnly) 187 throw new UnsupportedOperationException (); 188 super.setTextPreferenceKey(textKey); 189 } 190 191 public void setTextPreferenceValue(boolean textValue) { 192 if (fIsReadOnly) 193 throw new UnsupportedOperationException (); 194 super.setTextPreferenceValue(textValue); 195 } 196 197 public void setTextStylePreferenceKey(String key) { 198 if (fIsReadOnly) 199 throw new UnsupportedOperationException (); 200 super.setTextStylePreferenceKey(key); 201 } 202 203 public void setTextStyleValue(String value) { 204 if (fIsReadOnly) 205 throw new UnsupportedOperationException (); 206 super.setTextStyleValue(value); 207 } 208 209 protected void setValue(Object attribute, boolean value) { 210 if (fIsReadOnly) 211 throw new UnsupportedOperationException (); 212 super.setValue(attribute, value); 213 } 214 215 protected void setValue(Object attribute, int value) { 216 if (fIsReadOnly) 217 throw new UnsupportedOperationException (); 218 super.setValue(attribute, value); 219 } 220 221 protected void setValue(Object attribute, Object value) { 222 if (fIsReadOnly) 223 throw new UnsupportedOperationException (); 224 super.setValue(attribute, value); 225 } 226 227 public void setVerticalRulerPreferenceKey(String verticalRulerKey) { 228 if (fIsReadOnly) 229 throw new UnsupportedOperationException (); 230 super.setVerticalRulerPreferenceKey(verticalRulerKey); 231 } 232 233 public void setVerticalRulerPreferenceValue(boolean verticalRulerValue) { 234 if (fIsReadOnly) 235 throw new UnsupportedOperationException (); 236 super.setVerticalRulerPreferenceValue(verticalRulerValue); 237 } 238 239 public void markReadOnly() { 240 fIsReadOnly= true; 241 } 242 243 } 244 | Popular Tags |