Added a null checking to prevent a JavaModelException caused by null references
Removed unnecessary import
added hooks for getting plugin folder