Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2013-10-06 20:15:56 -0400
committerSteffen Pingel2013-10-06 21:24:39 -0400
commit090668cf664d9d21ef51040852e8d80bf7aaacac (patch)
treeb52a338a60f51175cde91979aa0eafb034e8b2dc
parent0c54cd5defb84ae6618e3983e0b5264213009c7c (diff)
downloadorg.eclipse.mylyn.tasks-090668cf664d9d21ef51040852e8d80bf7aaacac.tar.gz
org.eclipse.mylyn.tasks-090668cf664d9d21ef51040852e8d80bf7aaacac.tar.xz
org.eclipse.mylyn.tasks-090668cf664d9d21ef51040852e8d80bf7aaacac.zip
410655: add @NonNull to editor page factory
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=410655 Change-Id: I984a1f1bfa378640d76abdd00541737b5952d0f4 Signed-off-by: Benjamin Muskalla <benjamin.muskalla@tasktop.com>
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java
index 026632cb4..07a4b4da3 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java
@@ -11,6 +11,8 @@
package org.eclipse.mylyn.tasks.ui.editors;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IPluginContribution;
import org.eclipse.ui.forms.editor.IFormPage;
@@ -33,21 +35,26 @@ public abstract class AbstractTaskEditorPageFactory implements IPluginContributi
private String pluginId;
- public abstract boolean canCreatePageFor(TaskEditorInput input);
+ public abstract boolean canCreatePageFor(@NonNull TaskEditorInput input);
- public abstract IFormPage createPage(TaskEditor parentEditor);
+ @NonNull
+ public abstract IFormPage createPage(@NonNull TaskEditor parentEditor);
- public String[] getConflictingIds(TaskEditorInput input) {
+ @Nullable
+ public String[] getConflictingIds(@NonNull TaskEditorInput input) {
return null;
}
+ @Nullable
public String getId() {
return id;
}
// TODO EDITOR life cycle of image?
+ @NonNull
public abstract Image getPageImage();
+ @NonNull
public abstract String getPageText();
public int getPriority() {
@@ -63,6 +70,7 @@ public abstract class AbstractTaskEditorPageFactory implements IPluginContributi
*
* @since 3.2
*/
+ @Nullable
public final String getLocalId() {
return getId();
}
@@ -73,6 +81,7 @@ public abstract class AbstractTaskEditorPageFactory implements IPluginContributi
* @since 3.2
* @see #setPluginId(String)
*/
+ @Nullable
public final String getPluginId() {
return pluginId;
}
@@ -81,7 +90,7 @@ public abstract class AbstractTaskEditorPageFactory implements IPluginContributi
* @since 3.2
* @see #getPluginId()
*/
- public final void setPluginId(String pluginId) {
+ public final void setPluginId(@Nullable String pluginId) {
this.pluginId = pluginId;
}
@@ -96,7 +105,8 @@ public abstract class AbstractTaskEditorPageFactory implements IPluginContributi
* @return an image
* @since 3.10
*/
- public Image getPageImage(TaskEditor editor, IFormPage page) {
+ @NonNull
+ public Image getPageImage(@NonNull TaskEditor editor, @NonNull IFormPage page) {
return getPageImage();
}
@@ -111,7 +121,8 @@ public abstract class AbstractTaskEditorPageFactory implements IPluginContributi
* @return a label
* @since 3.10
*/
- public String getPageText(TaskEditor editor, IFormPage page) {
+ @NonNull
+ public String getPageText(@NonNull TaskEditor editor, @NonNull IFormPage page) {
return getPageText();
}

Back to the top