KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > uka > ipd > coverage > plugin > ui > MarkerList


1
2 package de.uka.ipd.coverage.plugin.ui;
3
4
5 /*******************************************************************************
6  * Copyright (c) 2000, 2004 IBM Corporation and others.
7  * All rights reserved. This program and the accompanying materials
8  * are made available under the terms of the Common Public License v1.0
9  * which accompanies this distribution, and is available at
10  * http://www.eclipse.org/legal/cpl-v10.html
11  *
12  * Contributors:
13  * IBM Corporation - initial API and implementation
14  *******************************************************************************/

15
16
17 /**
18  * Represents a list of ConcreteMarkers.
19  */

20 public class MarkerList {
21     //private static final String SEARCHING_FOR_MARKERS = Messages.getString("MarkerList.0"); //$NON-NLS-1$
22
//private Collection markers;
23
//
24
// /**
25
// * Lazily created marker table - maps IMarkers onto ConcreteMarkers.
26
// * Null if not created
27
// */
28
// private Map markerTable;
29
//
30
// private IMarker[] markers;
31
//
32
// /**
33
// * Creates a list containing the given set of markers
34
// *
35
// * @param markers
36
// */
37
// public MarkerList(IMarker[] markers) {
38
// this.markers = markers;
39
// }
40
//
41
//
42
// /**
43
// * Returns the marker table or lazily creates it if it doesn't exist yet
44
// *
45
// * @return a map of IMarker onto ConcreteMarker, containing all the ConcreteMarkers in the list
46
// */
47
// private Map getMarkerMap() {
48
// if (markerTable == null) {
49
// markerTable = new HashMap();
50
//
51
// for (int idx = 0; idx < markers.length; idx++) {
52
// IMarker marker = markers[idx];
53
// markerTable.put(marker, marker);
54
// }
55
// }
56
//
57
// return markerTable;
58
// }
59
//
60
// /**
61
// * Returns an existing marker from the list that is associated with
62
// * the given IMarker
63
// *
64
// * @param toFind the IMarker to lookup in the list
65
// * @return the ConcreteMarker that corresponds to the given IMarker
66
// */
67
// public IMarker getMarker(IMarker toFind) {
68
// return (IMarker) getMarkerMap().get(toFind);
69
// }
70
//
71
// public List asList() {
72
// return Arrays.asList(markers);
73
// }
74
//
75
// public MarkerList findMarkers(Collection ofIMarker) {
76
// List result = new ArrayList(ofIMarker.size());
77
//
78
// Iterator iter = ofIMarker.iterator();
79
// while (iter.hasNext()) {
80
// IMarker next = (IMarker)iter.next();
81
//
82
// IMarker marker = getMarker(next);
83
// if (marker != null) {
84
// result.add(marker);
85
// }
86
// }
87
//
88
// return new MarkerList((IMarker[]) result.toArray(new IMarker[result.size()]));
89
// }
90
//
91
//
92
//// /**
93
//// * Computes the set of markers that match the given filter
94
//// * @param filter the filter to apply
95
//// * @param mon the monitor to update
96
//// * @param ignoreExceptions whether or not exception will be shown
97
//// * @return MarkerList
98
//// * @throws CoreException
99
//// */
100
//// public static MarkerList compute(MarkerFilter filter, IProgressMonitor mon,
101
//// boolean ignoreExceptions) throws CoreException {
102
//// return new MarkerList(filter.findMarkers(mon, ignoreExceptions));
103
//// }
104
////
105
// /**
106
// * Returns a new MarkerList containing all markers in the workspace of the specified types
107
// * @param types
108
// * @return IMarker[]
109
// * @throws CoreException
110
// */
111
// public static IMarker[] compute(String[] types) throws CoreException {
112
//
113
// ArrayList result = new ArrayList();
114
// IResource input = ResourcesPlugin.getWorkspace().getRoot();
115
//
116
// for (int i = 0; i < types.length; i++) {
117
// IMarker[] newMarkers = input.findMarkers(types[i], true, IResource.DEPTH_INFINITE);
118
// result.addAll(Arrays.asList(newMarkers));
119
// }
120
//
121
// return (IMarker[])result.toArray(new IMarker[result.size()]);
122
// }
123
//
124
// /**
125
// * Returns the markers in the list. Read-only.
126
// *
127
// * @return an array of markers in the list
128
// */
129
// public IMarker[] toArray() {
130
// return markers;
131
// }
132
//
133
//
134
// /**
135
// * Returns the number of items in the list
136
// *
137
// * @return the number of items
138
// */
139
// public int getItemCount() {
140
// return markers.length;
141
// }
142
//
143

144     
145 }
146
Popular Tags