* be <code>null</code> to set <em>no</em> encoding on project level.
*/
protected void setEncoding(IProject project, @Nullable String encoding) {
if (!project.exists())
return;
BlockingProgressMonitor monitor = new BlockingProgressMonitor();
try {
project.setDefaultCharset(encoding, monitor);
monitor.await();
} catch (CoreException e) {
log.error("Could not set encoding on project.", e);
} catch (InterruptedException e) {
log.error("Code not designed to be interruptible", e);
Thread.currentThread().interrupt();