private boolean shouldValidateEditor(IProject project) {
   IPreferenceStoreAccess storeAccess =
       ProtobufEditorPlugIn.getInstanceOf(IPreferenceStoreAccess.class);
   GeneralPreferences preferences = generalPreferences(storeAccess, project);
   return preferences.shouldValidateFilesOnActivation();
 }
 private IProject projectFrom(IEditorPart editor) {
   Editors editors = ProtobufEditorPlugIn.getInstanceOf(Editors.class);
   return editors.projectOwningFileDisplayedIn(editor);
 }