Home | History | Annotate | Download | only in project

Lines Matching refs:marker

107      * Adds a marker to a file on a specific line. This methods catches thrown
110 * @param markerId The id of the marker to add.
112 * @param lineNumber the line number where to put the mark. If line is < 1, it puts the marker
114 * @param severity the severity of the marker.
123 * Adds a marker to a file on a specific line, for a specific range of text. This
127 * @param markerId The id of the marker to add.
130 * the marker on line 1,
131 * @param startOffset the beginning offset of the marker (relative to the beginning of
133 * @param endOffset the ending offset of the marker
134 * @param severity the severity of the marker.
145 IMarker marker = resource.createMarker(markerId);
146 marker.setAttribute(IMarker.MESSAGE, message);
147 marker.setAttribute(IMarker.SEVERITY, severity);
149 // if marker is text type, enforce a line number so that it shows in the editor
151 if (lineNumber < 1 && marker.isSubtypeOf(IMarker.TEXT)) {
156 marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
160 marker.setAttribute(IMarker.CHAR_START, startOffset);
161 marker.setAttribute(IMarker.CHAR_END, endOffset);
164 // on Windows, when adding a marker to a project, it takes a refresh for the marker
166 // markers (and only the element, not its children), to force the marker display.
169 return marker;
171 AdtPlugin.log(e, "Failed to add marker '%1$s' to '%2$s'", //$NON-NLS-1$
179 * Adds a marker to a resource. This methods catches thrown {@link CoreException},
182 * @param markerId The id of the marker to add.
184 * @param severity the severity of the marker.
194 * Adds a marker to an {@link IProject}. This method does not catch {@link CoreException}, like
198 * @param markerId The id of the marker to add.
200 * @param severity the severity of the marker.
201 * @param priority the priority of the marker
203 * @throws CoreException if the marker cannot be added
212 IMarker marker = project.createMarker(markerId);
213 marker.setAttribute(IMarker.MESSAGE, message);
214 marker.setAttribute(IMarker.SEVERITY, severity);
215 marker.setAttribute(IMarker.PRIORITY, priority);
217 // on Windows, when adding a marker to a project, it takes a refresh for the marker
219 // markers (and only the element, not its children), to force the marker display.
222 return marker;