diff options
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java index bf6073189..b746a68c7 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java @@ -53,4 +53,16 @@ public class BugzillaUtil { } } } + + /** + * Call this method if you did not know if an property exists + * + * @param taskRepository + * @param property + * @return true if the property is undefined or if the property is true + */ + public static boolean getTaskPropertyWithDefaultTrue(TaskRepository taskRepository, String property) { + String useParam = taskRepository.getProperty(property); + return (useParam == null || (useParam != null && useParam.equals("true"))); //$NON-NLS-1$ + } } |