Is it possible with Oracle SQL Developer? If not, any other tool were also okay.
Oracle SQL Developer is able to export DDL through Tools -> Database Export... This works very well, but requires manual intervention. I know of DBMS_METADATA.get_ddl(), but have found that the ...