public IndexNamesRegistry(File savedIndexNamesFile, IPath javaPluginWorkingLocation) { super(); this.savedIndexNamesFile = savedIndexNamesFile; this.writeJob = Job.create("Updating index names", this::save); //$NON-NLS-1$ this.writeJob.setSystem(true); this.javaPluginWorkingLocation = javaPluginWorkingLocation; }
public IndexNamesRegistry(File savedIndexNamesFile, IPath javaPluginWorkingLocation) { super(); this.savedIndexNamesFile = savedIndexNamesFile; this.writeJob = Job.create("", this::save); //$NON-NLS-1$ this.writeJob.setSystem(true); this.javaPluginWorkingLocation = javaPluginWorkingLocation; }
/** * Creates a new system {@link Job} with the given name that will execute * the provided runnable when it runs. * * @param name * the name of the job * @param runnable * the runnable to execute * @return a job that encapsulates the provided runnable * @see ICoreRunnable * @see Job#setSystem(boolean) * @since 3.8 */ public static Job createSystem(String name, final ICoreRunnable runnable) { Job job = create(name, runnable); job.setSystem(true); return job; }
@Override public void widgetSelected(SelectionEvent e) { Job job= Job.create(PreferencesMessages.JavaBasePreferencePage_rebuildingIndexJobName, monitor -> { JavaCore.rebuildIndex(monitor); }); job.setUser(true); job.schedule(); } });
private void searchForTestClass() { if (!pathText.getText().equals(loadedTestsParentProject) || testMethods == null) { loadedTestsParentProject = pathText.getText(); testMethods = null; Job.create(Messages.DotnetTestTab_retrieveClasses, (ICoreRunnable) monitor -> { testMethods = DotnetTestAccessor.getTestMethods(projectPath.toFile()); Display.getDefault().asyncExec(() -> { displayClassSelectorDialog(); }); }).schedule(); } else { displayClassSelectorDialog(); } }
gcJob = Job.create(IDEWorkbenchMessages.IDEIdleHelper_backgroundGC, (IJobFunction) monitor -> { final Display display = configurer.getWorkbench().getDisplay(); if (display != null && !display.isDisposed()) {
private void searchForTestMethods() { if (!pathText.getText().equals(loadedTestsParentProject) || testMethods == null) { loadedTestsParentProject = pathText.getText(); testMethods = null; Job.create(Messages.DotnetTestTab_retrieveClasses, (ICoreRunnable) monitor -> { testMethods = DotnetTestAccessor.getTestMethods(projectPath.toFile()); Display.getDefault().asyncExec(() -> { displayMethodSelectorDialog(); }); }).schedule(); } else { displayMethodSelectorDialog(); } }
private void fetchConfigurationInfo(final Text text) { text.setText(WorkbenchMessages.AboutSystemPage_RetrievingSystemInfo); Job job = Job.create(WorkbenchMessages.AboutSystemPage_FetchJobTitle, (IJobFunction) monitor -> { final String info = ConfigurationInfo.getSystemSummary(); if (!text.isDisposed()) { text.getDisplay().asyncExec(() -> { if (!text.isDisposed()) { text.setText(info); } }); } return Status.OK_STATUS; }); job.schedule(); } }
private void calculateAboutBundleData(Consumer<Collection<AboutBundleData>> aboutBundleDataConsumer, Display display) { Job loadBundleDataJob = Job.create(WorkbenchMessages.AboutPluginsPage_Load_Bundle_Data, monitor -> { // create a data object for each bundle, remove duplicates, and // include only resolved bundles (bug 65548) SubMonitor subMonitor = SubMonitor.convert(monitor, bundles.length + 1); Map<String, AboutBundleData> map = new HashMap<>(); for (Bundle bundle : bundles) { subMonitor.split(1); AboutBundleData data = new AboutBundleData(bundle); if (BundleUtility.isReady(data.getState()) && !map.containsKey(data.getVersionedId())) { map.put(data.getVersionedId(), data); } } subMonitor.split(1); display.asyncExec(() -> aboutBundleDataConsumer.accept(map.values())); }); loadBundleDataJob.schedule(); }
deferredIdentifierJob = Job.create("Activity Identifier Update", (IJobFunction) monitor -> { //$NON-NLS-1$ final Map<String, IdentifierEvent> identifierEventsByIdentifierId = new HashMap<>();
private void scheduleRecursiveChangesJob(final IResource resource, final List/*<IResourceChange>*/ changes) { Job.create(IDEWorkbenchMessages.ResourceInfo_recursiveChangesJobName, monitor -> { try {
Job.create(Messages.DotnetExportWizard_dotnetCoreExport, (ICoreRunnable) monitor -> { try { ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
final Job signerJob = Job.create(NLS.bind( WorkbenchMessages.BundleSigningTray_Determine_Signer_For, myData.getId()), (IJobFunction) monitor -> { signerJob.schedule(); Job cleanup = Job.create(WorkbenchMessages.BundleSigningTray_Unget_Signing_Service, (IJobFunction) monitor -> { try { Job.getJobManager().join(signerJob, monitor);
StatusReporter.class); Job job = Job.create(IDEWorkbenchMessages.ShowInSystemExplorerHandler_jobTitle, monitor -> { String logMsgPrefix; try {
Job charsetJob = Job.create(IDEWorkbenchMessages.IDEEncoding_EncodingJob, monitor -> { try { if (!hasSameEncoding) {
final String login = this.detailPage.getGithubLogin(); final String password = this.detailPage.getGithubPassword(); final Job job = Job.create(Messages.SubmitEclipseLogWizard_0, monitor -> { try { final SubMonitor subMonitor = SubMonitor.convert(monitor, 2);
Job buildJob = Job.create("dotnet build > " + container.getFullPath(), mon -> { //$NON-NLS-1$ String[] cmdLine = new String[] { AcutePlugin.getDotnetCommand(), "build" }; //$NON-NLS-1$ Process restoreProcess;
return; Job.create(Messages.DotnetNewWizardPage_retriveTemplates, (ICoreRunnable) monitor -> { final java.util.List<Template> templates = DotnetNewAccessor.getTemplates(); Display.getDefault().asyncExec(() -> {