nitind | b2adeab | 2005-06-03 20:10:06 +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 | * |
| 11 | *******************************************************************************/ |
| 12 | package org.eclipse.wst.sse.core.internal.provisional.tasks; |
| 13 | |
| 14 | import org.eclipse.core.resources.IMarker; |
| 15 | |
nitind | 11f1e70 | 2005-06-13 22:57:29 +0000 | [diff] [blame] | 16 | /** |
| 17 | * Simple representation of the values that make up a Task Tag |
| 18 | */ |
nitind | b2adeab | 2005-06-03 20:10:06 +0000 | [diff] [blame] | 19 | public final class TaskTag { |
| 20 | |
| 21 | public static final int PRIORITY_HIGH = IMarker.PRIORITY_HIGH; |
| 22 | public static final int PRIORITY_LOW = IMarker.PRIORITY_LOW; |
| 23 | public static final int PRIORITY_NORMAL = IMarker.PRIORITY_NORMAL; |
| 24 | |
nitind | 11f1e70 | 2005-06-13 22:57:29 +0000 | [diff] [blame] | 25 | /** |
| 26 | * this task tag's priority |
| 27 | */ |
nitind | b2adeab | 2005-06-03 20:10:06 +0000 | [diff] [blame] | 28 | private int fPriority = PRIORITY_NORMAL; |
nitind | 11f1e70 | 2005-06-13 22:57:29 +0000 | [diff] [blame] | 29 | |
| 30 | /** |
| 31 | * this task tag's "tagging" text |
| 32 | */ |
nitind | b2adeab | 2005-06-03 20:10:06 +0000 | [diff] [blame] | 33 | private String fTag = null; |
| 34 | |
| 35 | public TaskTag(String tag, int priority) { |
| 36 | super(); |
| 37 | fTag = tag; |
| 38 | fPriority = priority; |
| 39 | } |
| 40 | |
| 41 | public int getPriority() { |
| 42 | return fPriority; |
| 43 | } |
| 44 | |
| 45 | public String getTag() { |
| 46 | return fTag; |
| 47 | } |
| 48 | |
| 49 | public String toString() { |
david_williams | bd59628 | 2005-06-07 22:10:42 +0000 | [diff] [blame] | 50 | return getTag() + ":" + getPriority(); //$NON-NLS-1$ |
nitind | b2adeab | 2005-06-03 20:10:06 +0000 | [diff] [blame] | 51 | } |
| 52 | } |