Just an idea: Unify these into one inherited method (`canHandleFile(workspace.File file)` or something)?