Question

I am currently facing a issue with a long running job in my rcp application .On starting the job i have a progressbar with 3 buttons and one checkbox .And if user checked the checkbox and pressed the run in background then my progressbar dialog is not coming back. So I tried to use a preference page where User can check and unchecked this settings .But I learnt that I have to use some internal things to do that WorkbenchPlugin.PlatformUI.getPreferenceStore().setValue( IPreferenceConstants.RUN_IN_BACKGROUND, false );

And according to practice I should not do that .So is there any better way or is there any way to remove run in background checkbox from the progressbar dilaog.

Any help on this will be appreciated .

Was it helpful?

Solution

You can do this without using internal classes with:

IPersistentPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.ui.workbench");

store.setValue("RUN_IN_BACKGROUND", false);

store.save();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top