private static boolean isEmpty(final IScriptFolder fragment) throws ModelException { return !fragment.containsScriptResources() && fragment.getForeignResources().length == 0; }