diff --git a/tmc-plugin/src/fi/helsinki/cs/tmc/actions/PastebinAction.java b/tmc-plugin/src/fi/helsinki/cs/tmc/actions/PastebinAction.java index f46eded2..90dbee3d 100644 --- a/tmc-plugin/src/fi/helsinki/cs/tmc/actions/PastebinAction.java +++ b/tmc-plugin/src/fi/helsinki/cs/tmc/actions/PastebinAction.java @@ -77,6 +77,11 @@ public boolean enable(Project... projects) { } } + @Override + protected boolean enabledFor(Exercise exercise) { + return exercise.getReturnable(); + } + @Override protected void performAction(Node[] nodes) { List project = projectsFromNodes(nodes); diff --git a/tmc-plugin/src/fi/helsinki/cs/tmc/data/Exercise.java b/tmc-plugin/src/fi/helsinki/cs/tmc/data/Exercise.java index 67615fe9..2951888d 100644 --- a/tmc-plugin/src/fi/helsinki/cs/tmc/data/Exercise.java +++ b/tmc-plugin/src/fi/helsinki/cs/tmc/data/Exercise.java @@ -194,6 +194,10 @@ public void setReturnable(boolean returnable) { this.returnable = returnable; } + public boolean getReturnable() { + return this.returnable; + } + public boolean requiresReview() { return requiresReview; }