Adds missing getOption() synchronization call

The previous getOption call (old API) was replaced by an asyncExec, it requires
a getOption() (new API) to wait for the execution of the code.
Merge pull request #798 from skyluc/issue/NPE-create-class

Adds missing getOption() synchronization call