Beispiel #1
0
/*--------------------------------------------------------------------
 * add_std_fse_menu
 *
 */
void
add_std_fse_menu(vmenu* root_menu, char* parent_menu)
{
  /* file set entry submenu */
  FileSetBlock *fsb = suif_env->get_file_set_block();
  if (!fsb) return;
  for (int i = 0; i < fsb->get_file_block_count(); ++i) {
    FileBlock *file = fsb->get_file_block(i);
    binding *b = new binding((bfun) &do_show_fse, file);
    const char* name = file->get_source_file_name().c_str();    
    root_menu->add_command(b, parent_menu, name ? name : "<no name>" );
  }
}
static ObjectLocation get_object_filename(SuifObject *obj) {
  ObjectLocation loc;
  if (!obj) {
    return(loc);
  }
  while (obj && !is_kind_of<FileBlock>(obj)) {
    obj = obj->get_parent();
  }
  if (!obj) return loc;
  FileBlock *fb = to<FileBlock>(obj);
  return(ObjectLocation(fb->get_source_file_name(),
			0));
}