execute(project, executor, configuration, created);
}
private static DataContext createDataContext(@NotNull Editor editor, @NotNull final PsiElement element) {
final DataContext dataContext = DataManager.getInstance().getDataContext(editor.getComponent());
return new DataContext() {
@Nullable
@Override
public Object getData(@NonNls String dataId) {
if (Location.DATA_KEY.is(dataId)) {
return new PsiLocation<PsiElement>(element.getProject(), element);
}
return dataContext.getData(dataId);
}
};
}