Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bundles/org.eclipse.jface.text/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jface.text
Bundle-Version: 3.30.0.qualifier
Bundle-Version: 3.30.100.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package:
Expand All @@ -12,6 +12,7 @@ Export-Package:
org.eclipse.jface.internal.text.codemining;x-internal:=true,
org.eclipse.jface.internal.text.html;x-friends:="org.eclipse.ant.ui, org.eclipse.jdt.ui, org.eclipse.ltk.ui.refactoring, org.eclipse.pde.ui, org.eclipse.ui.editors, org.eclipse.xtext.ui",
org.eclipse.jface.internal.text.link.contentassist;x-internal:=true,
org.eclipse.jface.internal.text.reconciler;x-internal:=true,
org.eclipse.jface.internal.text.revisions;x-internal:=true,
org.eclipse.jface.internal.text.source;x-internal:=true,
org.eclipse.jface.text,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*******************************************************************************
* Copyright (c) 2026 Simeon Andreev and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Simeon Andreev - initial API and implementation
*******************************************************************************/
package org.eclipse.jface.internal.text.reconciler;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.IJobManager;

public class ReconcilerJobFamilies {

/**
* Constant identifying the job family identifier for the background reconciler job.
*
* @see IJobManager#join(Object, IProgressMonitor)
*/
public static final Object FAMILY_RECONCILER= new Object();

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@

import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobFunction;
import org.eclipse.core.runtime.jobs.Job;

import org.eclipse.jface.internal.text.reconciler.ReconcilerJobFamilies;

import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
Expand Down Expand Up @@ -227,7 +231,7 @@ public void startReconciling() {
if (!fStarted) {
fIsAlive= true;
fStarted= true;
Job.createSystem("Delayed Reconciler startup for " + fName, m -> { //$NON-NLS-1$
new ReconcilerJob("Delayed Reconciler startup for " + fName, m -> { //$NON-NLS-1$
//Until we process some code from the job, the reconciler thread is the current thread
fThread= Thread.currentThread();
delay();
Expand Down Expand Up @@ -679,4 +683,25 @@ protected synchronized boolean isRunningInReconcilerThread() {
}
return Thread.currentThread() == fWorker.fThread;
}

private static class ReconcilerJob extends Job {

private final IJobFunction function;

private ReconcilerJob(String name, IJobFunction function) {
super(name);
setSystem(true);
this.function= function;
}

@Override
protected IStatus run(IProgressMonitor monitor) {
return function.run(monitor);
}

@Override
public boolean belongsTo(Object family) {
return ReconcilerJobFamilies.FAMILY_RECONCILER == family;
}
}
}
Loading