Search in sources :

Example 1 with LibHoverLoadJob

use of org.eclipse.linuxtools.internal.cdt.libhover.LibHoverLoadJob in project linuxtools by eclipse.

the class LibhoverPlugin method start.

@Override
public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    ResourcesPlugin.getWorkspace().addSaveParticipant(PLUGIN_ID, new ISaveParticipant() {

        @Override
        public void saving(ISaveContext saveContext) {
            save();
        }

        @Override
        public void rollback(ISaveContext saveContext) {
        }

        @Override
        public void prepareToSave(ISaveContext saveContext) {
        }

        @Override
        public void doneSaving(ISaveContext saveContext) {
        }
    });
    IPreferenceStore ps = getPreferenceStore();
    if (ps == null || !ps.getBoolean(PreferenceConstants.LAZY_LOAD)) {
        Job k = new LibHoverLoadJob(LibHoverMessages.getString(LOAD_JOB_TXT));
        k.schedule();
    }
}
Also used : ISaveParticipant(org.eclipse.core.resources.ISaveParticipant) ISaveContext(org.eclipse.core.resources.ISaveContext) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) Job(org.eclipse.core.runtime.jobs.Job) LibHoverLoadJob(org.eclipse.linuxtools.internal.cdt.libhover.LibHoverLoadJob) LibHoverLoadJob(org.eclipse.linuxtools.internal.cdt.libhover.LibHoverLoadJob)

Aggregations

ISaveContext (org.eclipse.core.resources.ISaveContext)1 ISaveParticipant (org.eclipse.core.resources.ISaveParticipant)1 Job (org.eclipse.core.runtime.jobs.Job)1 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)1 LibHoverLoadJob (org.eclipse.linuxtools.internal.cdt.libhover.LibHoverLoadJob)1