david_williams | 49d24fb | 2005-04-08 21:16:59 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2001, 2005 IBM Corporation and others. |
| 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
| 7 | * |
| 8 | * Contributors: |
| 9 | * IBM Corporation - initial API and implementation |
| 10 | *******************************************************************************/ |
david_williams | 96643dd | 2005-04-13 04:35:24 +0000 | [diff] [blame] | 11 | package org.eclipse.wst.html.internal.validation; |
pavery | e6107e6 | 2005-02-23 18:01:10 +0000 | [diff] [blame] | 12 | |
| 13 | import org.eclipse.core.resources.IResource; |
| 14 | import org.eclipse.core.runtime.CoreException; |
| 15 | |
pavery | e6107e6 | 2005-02-23 18:01:10 +0000 | [diff] [blame] | 16 | /** |
pavery | e6107e6 | 2005-02-23 18:01:10 +0000 | [diff] [blame] | 17 | * |
david_williams | e59c80f | 2005-10-03 00:53:44 +0000 | [diff] [blame] | 18 | * Class to help this Problem's list. |
| 19 | * |
pavery | e6107e6 | 2005-02-23 18:01:10 +0000 | [diff] [blame] | 20 | */ |
david_williams | e59c80f | 2005-10-03 00:53:44 +0000 | [diff] [blame] | 21 | class TaskListHelper { |
pavery | e6107e6 | 2005-02-23 18:01:10 +0000 | [diff] [blame] | 22 | private static TaskListHelper _taskListHelper = null; |
| 23 | |
| 24 | public static TaskListHelper getTaskList() { |
| 25 | if (_taskListHelper == null) { |
| 26 | _taskListHelper = new TaskListHelper(); |
| 27 | } |
| 28 | return _taskListHelper; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * This method adds a message to a resource in the task list. |
| 33 | */ |
| 34 | public void addTask(String pluginId, IResource resource, String location, String messageId, String message, int markerType, String targetObjectName, String groupName, int offset, int length) throws CoreException { |
| 35 | TaskListUtility.addTask(pluginId, resource, location, messageId, message, markerType, targetObjectName, groupName, offset, length); |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * This method removes all messages from a resource in the task list. |
| 40 | */ |
| 41 | public void removeAllTasks(IResource resource, String owner, String objectName) throws CoreException { |
| 42 | TaskListUtility.removeAllTasks(resource, owner, objectName); |
| 43 | } |
| 44 | } |