* Get the task editor for this task. If no editor exists create one
*/
private TaskEditor getTaskEditor(EditableTask editable) {
if (editable.getEditor() == null) {
// Create a new editor using the extension point data
TaskEditor editor = TaskEditorManager.getInstance().getEditor(editable.getKind());
if (editor != null) {
Composite editorPanel = new Composite(taskEditorContainer, SWT.NULL);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
editorPanel.setLayout(layout);
mform.getToolkit().adapt(editorPanel);
editor.createControl(editorPanel, mform.getToolkit());
editable.setEditor(editor);
GridData gridData = new GridData(GridData.FILL_BOTH);
editor.getControl().setLayoutData(gridData);
}
}
return editable.getEditor();
}