As such, the idea of crafting specific tasks that the user can interact with seems an appealing idea.
Here's a screen shot of a simple first attempt.
Note that I've used the Eclipse Forms controls to blend in with the "flat look" layout.
This was pretty easy to get going:
- Define a task extension in your plug-in.
<taskEditor
class="mypdeproject.tasks.MyTaskExtension"
icon="icons/sample.gif"
id="MyPdeProject.taskEditor1">
</taskEditor> - Define the class referenced above. It needs to implement org.eclipse.ui.internal.provisional.cheatsheets.TaskEditor
- Implement the required methods. The main one of which is the createControl method - to create the UI controls used to edit the task.
public void createControl(Composite comp,
Obviously, you may want to define a few more fields in there than this.
FormToolkit toolkit) {
form = toolkit.createForm(comp);
form.setText("Hello, Eclipse Forms");
} - Define a complex task, and then reference our newly defined task extension.
<task id="t2" kind="MyPdeProject.taskEditor1"
name="Extended task"
skip="false">
<intro>
Introduction Extended
</intro>
<onCompletion>
This is the Conclusion
</onCompletion>
</task>
And that's it! Simple really.
Next, I'll take a look at how you can use task variables to communicate between your tasks.
No comments:
Post a Comment