1 19 20 package org.netbeans.modules.tasklist.suggestions; 21 22 import org.netbeans.modules.tasklist.core.TaskProperties; 23 import org.netbeans.modules.tasklist.core.filter.SuggestionProperty; 24 25 26 32 public class SuggestionImplProperties extends TaskProperties { 33 34 public static final String PROPID_LINE_NUMBER = "line"; 35 public static final String PROPID_FILENAME = "file"; 36 public static final String PROPID_LOCATION = "location"; 37 public static final String PROPID_CATEGORY = "category"; 38 39 40 public static SuggestionProperty getProperty(String propID) { 41 if (propID.equals(PROPID_LINE_NUMBER)) { return PROP_LINE_NUMBER;} 42 else if (propID.equals(PROPID_FILENAME)) { return PROP_FILENAME;} 43 else if (propID.equals(PROPID_LOCATION)) { return PROP_LOCATION;} 44 else if (propID.equals(PROPID_CATEGORY)) { return PROP_CATEGORY;} 45 else return TaskProperties.getProperty(propID); 46 } 47 48 public static final SuggestionProperty PROP_LINE_NUMBER = 49 new SuggestionProperty(PROPID_LINE_NUMBER, Integer .class) { 50 public Object getValue(Object obj) {return new Integer (((SuggestionImpl) obj).getLineNumber()); } 51 }; 52 53 public static final SuggestionProperty PROP_FILENAME = 54 new SuggestionProperty(PROPID_FILENAME, String .class) { 55 public Object getValue(Object obj) {return ((SuggestionImpl) obj).getFileBaseName(); } 56 }; 57 58 public static final SuggestionProperty PROP_LOCATION = 59 new SuggestionProperty(PROPID_LOCATION, String .class) { 60 public Object getValue(Object obj) {return ((SuggestionImpl) obj).getLocation(); } 61 }; 62 63 public static final SuggestionProperty PROP_CATEGORY = 64 new SuggestionProperty(PROPID_CATEGORY, String .class) { 65 public Object getValue(Object obj) {return ((SuggestionImpl)obj).getCategory(); } 66 }; 67 68 } 69 70 | Popular Tags |