Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 137356
Collapse All | Expand All

(-)src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java (-13 / +42 lines)
Lines 7-12 Link Here
7
import java.util.Iterator;
7
import java.util.Iterator;
8
import java.util.List;
8
import java.util.List;
9
import java.util.Map;
9
import java.util.Map;
10
import java.util.Set;
10
11
11
import org.eclipse.core.resources.IMarker;
12
import org.eclipse.core.resources.IMarker;
12
import org.eclipse.core.runtime.CoreException;
13
import org.eclipse.core.runtime.CoreException;
Lines 143-170 Link Here
143
		}
144
		}
144
		IExtension[] extensions = point.getExtensions();
145
		IExtension[] extensions = point.getExtensions();
145
		// initial population
146
		// initial population
147
		Map groupingEntries = new HashMap();
148
		Set attributeMappings = new HashSet();
146
		for (int i = 0; i < extensions.length; i++) {
149
		for (int i = 0; i < extensions.length; i++) {
147
			IExtension extension = extensions[i];
150
			IExtension extension = extensions[i];
148
			processExtension(tracker, extension);
151
			processExtension(tracker, extension, groupingEntries,
152
					attributeMappings);
149
		}
153
		}
154
		postProcessExtensions(groupingEntries, attributeMappings);
150
		tracker.registerHandler(this, ExtensionTracker
155
		tracker.registerHandler(this, ExtensionTracker
151
				.createExtensionPointFilter(point));
156
				.createExtensionPointFilter(point));
152
157
153
	}
158
	}
154
159
155
	/**
160
	/**
156
	 * Process the extension and register the result with the tracker.
161
	 * Process the extension and register the result with the tracker. Fill the
162
	 * map of groupingEntries and attribueMappings processed for post
163
	 * processing.
157
	 * 
164
	 * 
158
	 * @param tracker
165
	 * @param tracker
159
	 * @param extension
166
	 * @param extension
167
	 * @param groupingEntries
168
	 *            Mapping of group names to the markerGroupingEntries registered
169
	 *            for them
170
	 * @param attributeMappings
171
	 *            the markerAttributeGroupings found
172
	 * @see #postProcessExtensions(Map, Collection)
160
	 */
173
	 */
161
	private void processExtension(IExtensionTracker tracker,
174
	private void processExtension(IExtensionTracker tracker,
162
			IExtension extension) {
175
			IExtension extension, Map groupingEntries,
176
			Collection attributeMappings) {
163
		IConfigurationElement[] elements = extension.getConfigurationElements();
177
		IConfigurationElement[] elements = extension.getConfigurationElements();
164
178
165
		Map groupingEntries = new HashMap();
166
		Collection attributeMappings = new HashSet();
167
168
		for (int j = 0; j < elements.length; j++) {
179
		for (int j = 0; j < elements.length; j++) {
169
			IConfigurationElement element = elements[j];
180
			IConfigurationElement element = elements[j];
170
			if (element.getName().equals(PROBLEM_FILTER)) {
181
			if (element.getName().equals(PROBLEM_FILTER)) {
Lines 233-246 Link Here
233
						IExtensionTracker.REF_STRONG);
244
						IExtensionTracker.REF_STRONG);
234
			}
245
			}
235
246
236
			processGroupingEntries(groupingEntries);
237
			processAttributeMappings(attributeMappings);
238
239
		}
247
		}
240
	}
248
	}
241
249
242
	/**
250
	/**
243
	 * Process the grouping entries into thier required plug-ins.
251
	 * Process the cross references after all of the extensions have been read.
252
	 * 
253
	 * @param groupingEntries
254
	 * @param attributeMappings
255
	 * @param groupingEntries
256
	 *            Mapping of group names to the markerGroupingEntries registered
257
	 *            for them
258
	 * @param attributeMappings
259
	 *            the markerAttributeGroupings found
260
	 */
261
	private void postProcessExtensions(Map groupingEntries,
262
			Collection attributeMappings) {
263
		processGroupingEntries(groupingEntries);
264
		processAttributeMappings(attributeMappings);
265
	}
266
267
	/**
268
	 * Process the grouping entries into thier required grouping entries.
244
	 * 
269
	 * 
245
	 * @param groupingEntries
270
	 * @param groupingEntries
246
	 */
271
	 */
Lines 275-281 Link Here
275
	}
300
	}
276
301
277
	/**
302
	/**
278
	 * Process the attribute mappings into thier required plug-ins.
303
	 * Process the attribute mappings into thier required grouping entries.
279
	 * 
304
	 * 
280
	 * @param attributeMappings
305
	 * @param attributeMappings
281
	 */
306
	 */
Lines 342-348 Link Here
342
	 *      org.eclipse.core.runtime.IExtension)
367
	 *      org.eclipse.core.runtime.IExtension)
343
	 */
368
	 */
344
	public void addExtension(IExtensionTracker tracker, IExtension extension) {
369
	public void addExtension(IExtensionTracker tracker, IExtension extension) {
345
		processExtension(tracker, extension);
370
		Map groupingEntries = new HashMap();
371
		Set attributeMappings = new HashSet();
372
		processExtension(tracker, extension, groupingEntries, attributeMappings);
373
		postProcessExtensions(groupingEntries, attributeMappings);
346
	}
374
	}
347
375
348
	/**
376
	/**
Lines 670-679 Link Here
670
698
671
	/**
699
	/**
672
	 * Return the default group.
700
	 * Return the default group.
701
	 * 
673
	 * @return IField
702
	 * @return IField
674
	 */
703
	 */
675
	public IField getDefaultGroup() {
704
	public IField getDefaultGroup() {
676
		
705
677
		return (IField) markerGroups.get(SEVERITY_ID);
706
		return (IField) markerGroups.get(SEVERITY_ID);
678
	}
707
	}
679
708

Return to bug 137356