public class ConvertInlineToWodAction extends AbstractTemplateAction {
@Override
public void run(IAction action) {
try {
ComponentEditorPart componentEditorPart = getComponentEditorPart();
if (componentEditorPart != null) {
IEditorPart activeEditorPart = componentEditorPart.getActiveEditor();
TemplateEditor templateEditor = getTemplateEditor();
WodEditor wodEditor = getWodEditor();
if (templateEditor != null && wodEditor != null && activeEditorPart == templateEditor) {
ITextSelection templateSelection = (ITextSelection) templateEditor.getSourceEditor().getSelectionProvider().getSelection();
int offset = templateSelection.getOffset();