Custom Task Guide

Custom Task Guide

Add getTagName Method

Add getTagName Method

The next step is to add the abstract method, getTagName. All tasks must indicate the tag name they use in the XML by returning it from this method. In our case we return “example:copy”.
Please note that the red text denotes the new source added to the example.
package com.example; import com.linoma.ga.projects.CustomTask; import com.linoma.ga.projects.TaskContainer; public class CopyTask extends CustomTask { private static final String TAG_NAME = "example:copy"; public CopyTask(TaskContainer parent) { super(parent); } @Override public String getTagName() { return TAG_NAME; } }

0 COMMENTS

We’d like to hear from you!