void flushPreferences(Preferences projectPrefs, boolean shouldDisableCharsetDeltaJob) throws BackingStoreException { if (projectPrefs != null) { try { if (shouldDisableCharsetDeltaJob) charsetListener.setDisabled(true); projectPrefs.flush(); } finally { if (shouldDisableCharsetDeltaJob) charsetListener.setDisabled(false); } } }
@Override public void startup(IProgressMonitor monitor) { job = new CharsetManagerJob(); resourceChangeListener = new ResourceChangeListener(); workspace.addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); charsetListener = new CharsetDeltaJob(workspace); charsetListener.startup(); }
@Override public void shutdown(IProgressMonitor monitor) { workspace.removeResourceChangeListener(resourceChangeListener); if (charsetListener != null) charsetListener.shutdown(); }
public void projectPreferencesChanged(IProject project) { charsetListener.charsetPreferencesChanged(project); }