Adding Contextual Links to Ctools Custom Content Type Plugin
You don't need to do that, what you can do is you can implement a hook_menu_alter and do this. 

function YOUR-MODULE_menu_alter(&amp;$items) {
  $items['YOUR-PLUGIN-PATH/%ctools_export_ui/edit']['context'] = MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE;
}


and then add your contextual link to your object. If it a block you can add below code in to your hook_block_view.

$block['content']['#contextual_links'] = array(
  'YOUR-CUSTOM-PLUGIN' =&gt; array('YOUR-PLUGIN-PATH', array($delta, 'edit'))
);