Skip to content

Remove WS_CARBON check #3077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
12c4eba
This PR removes the only remaining WS_CARBON check from the codebase.
elsazac Jun 25, 2025
d56188f
Paint Whole FormText to Avoid Rendering Artifacts
amartya4256 Jul 1, 2025
d3faeb4
Version bump(s) for 4.37 stream
amartya4256 Jul 2, 2025
55a6cf1
Refactor Image(Display, int, int) in Tests
ShahzaibIbrahim May 28, 2025
300360e
Version bump(s) for 4.37 stream
eclipse-platform-bot Jun 5, 2025
a56fbc4
Avoid IllegalArgumentException if the line number mapping fails
iloveeclipse Jul 3, 2025
9c3250b
Use I-Builds to resolve platform CDT dependencies
iloveeclipse Jul 3, 2025
cd58a4d
StickyLine.getText() should not fail on not mapped widget lines
iloveeclipse Jul 3, 2025
df4eca1
FormText.paint(): don't pass (0,0) to Image constructor
iloveeclipse Jul 7, 2025
312d606
Extract Reconciler Job Into an own class
laeubi Jul 5, 2025
6359bc2
Only start the reconciler thread with a job
laeubi Jul 8, 2025
eeaf7b0
Perform initial work in the job
laeubi Jul 8, 2025
61f02f1
Add scope changed notification to SearchDialog
jjohnstn Jul 8, 2025
f330f3f
Version bump(s) for 4.37 stream
eclipse-platform-bot Jul 8, 2025
da1671b
Update bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IScope…
jjohnstn Jul 9, 2025
a2a5c0f
Update bundles/org.eclipse.search/search/org/eclipse/search/internal/…
jjohnstn Jul 9, 2025
c04e771
Update bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ScopeC…
jjohnstn Jul 9, 2025
51c7036
Use lambda to invoide scopeChanged method for listeners
jjohnstn Jul 9, 2025
8ce465b
Do not fetch input eagerly if not required
laeubi Jul 17, 2025
f5f04e7
Extend existence check in URLImageDescriptor when running without OSGi
ptziegler Jul 11, 2025
2252e99
Restore correct URL/URI handling in URLImageDescriptor
ptziegler Jul 17, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

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.Job;
Expand Down Expand Up @@ -56,31 +55,27 @@ abstract public class AbstractReconciler implements IReconciler {
/**
* Background thread for the reconciling activity.
*/
private class BackgroundThread extends Job {
class BackgroundWorker implements Runnable {

/** Has the reconciler been canceled. */
private boolean fCanceled= false;
private boolean fCanceled;
/** Has the reconciler been reset. */
private boolean fReset= false;
private boolean fReset;
/** Some changes need to be processed. */
private boolean fIsDirty= false;
private boolean fIsDirty;
/** Is a reconciling strategy active. */
private boolean fIsActive= false;
private boolean fIsActive;

private volatile boolean fIsAlive;
private boolean fStarted;

private boolean started;
private String fName;

/**
* Creates a new background thread. The thread
* runs with minimal priority.
*
* @param name the thread's name
*/
public BackgroundThread(String name) {
super(name);
setPriority(Job.DECORATE);
setSystem(true);
private boolean fIsAlive;

private volatile Thread fThread;

public BackgroundWorker(String name) {
fName= name;
}

/**
Expand All @@ -105,7 +100,7 @@ public synchronized boolean isDirty() {
/**
* Cancels the background thread.
*/
public void doCancel() {
public void cancel() {
fCanceled= true;
IProgressMonitor pm= fProgressMonitor;
if (pm != null)
Expand Down Expand Up @@ -160,9 +155,7 @@ public void reset() {
fDirtyRegionQueue.notifyAll();
}
}
synchronized (this) {
started= false;
}

informNotFinished();
reconcilerReset();
}
Expand All @@ -171,79 +164,91 @@ public void reset() {
* The background activity. Waits until there is something in the
* queue managing the changes that have been applied to the text viewer.
* Removes the first change from the queue and process it.
* <p>
* Calls {@link AbstractReconciler#initialProcess()} on entrance.
* </p>
*/
@Override
public IStatus run(IProgressMonitor monitor) {
fIsAlive= true;
delay();

if (fCanceled)
return Status.CANCEL_STATUS;

initialProcess();

while (!fCanceled) {

delay();
public void run() {
try {
while (!fCanceled) {

if (fCanceled)
break;
delay();

if (!isDirty()) {
waitFinish= false; //signalWaitForFinish() was called but nothing todo
continue;
}
if (fCanceled)
break;

synchronized (this) {
if (fReset) {
fReset= false;
if (!isDirty()) {
waitFinish= false; //signalWaitForFinish() was called but nothing todo
continue;
}
}

DirtyRegion r= null;
synchronized (fDirtyRegionQueue) {
r= fDirtyRegionQueue.removeNextDirtyRegion();
}
synchronized (this) {
if (fReset) {
fReset= false;
continue;
}
}

fIsActive= true;
DirtyRegion r= null;
synchronized (fDirtyRegionQueue) {
r= fDirtyRegionQueue.removeNextDirtyRegion();
}

fProgressMonitor.setCanceled(false);
fIsActive= true;

process(r);
fProgressMonitor.setCanceled(false);

synchronized (fDirtyRegionQueue) {
if (0 == fDirtyRegionQueue.getSize()) {
synchronized (this) {
fIsDirty= fProgressMonitor.isCanceled();
process(r);

synchronized (fDirtyRegionQueue) {
if (fDirtyRegionQueue.isEmpty()) {
synchronized (this) {
fIsDirty= fProgressMonitor.isCanceled();
}
fDirtyRegionQueue.notifyAll();
}
fDirtyRegionQueue.notifyAll();
}
fIsActive= false;
}

fIsActive= false;
} finally {
fIsAlive= false;
}
fIsAlive= false;
return Status.OK_STATUS;
}

public boolean isAlive() {
boolean isAlive() {
return fIsAlive;
}

public synchronized void start() {
if (!started) {
started= true;
schedule();
/**
* Star the reconciling if not running (and calls
* {@link AbstractReconciler#initialProcess()}) or {@link #reset()} otherwise.
*/
public void startReconciling() {
if (!fStarted) {
fIsAlive= true;
fStarted= true;
Job.createSystem("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();
if (fCanceled) {
return Status.CANCEL_STATUS;
}
initialProcess();
if (fCanceled) {
return Status.CANCEL_STATUS;
}
Thread thread= new Thread(this);
thread.setName(fName);
thread.setPriority(Thread.MIN_PRIORITY);
thread.setDaemon(true);
//we will no longer process any code here, so hand over to the worker thread.
fThread= thread;
thread.start();
return Status.OK_STATUS;
}).schedule();
} else {
reset();
}
}

@Override
public boolean belongsTo(Object family) {
return family == fViewer || AbstractReconciler.class == family;
}
}

Expand All @@ -259,7 +264,7 @@ public void documentAboutToBeChanged(DocumentEvent e) {
@Override
public void documentChanged(DocumentEvent e) {

if (fThread.isActive() || !fThread.isDirty() && fThread.isAlive()) {
if (fWorker.isActive() || !fWorker.isDirty() && fWorker.isAlive()) {
if (!fIsAllowedToModifyDocument && isRunningInReconcilerThread())
throw new UnsupportedOperationException("The reconciler thread is not allowed to modify the document"); //$NON-NLS-1$
aboutToBeReconciledInternal();
Expand All @@ -269,13 +274,13 @@ public void documentChanged(DocumentEvent e) {
* The second OR condition handles the case when the document
* gets changed while still inside initialProcess().
*/
if (fThread.isActive() || fThread.isDirty() && fThread.isAlive())
if (fWorker.isActive() || fWorker.isDirty() && fWorker.isAlive())
fProgressMonitor.setCanceled(true);

if (fIsIncrementalReconciler)
createDirtyRegion(e);

fThread.reset();
fWorker.reset();

}

Expand All @@ -291,11 +296,11 @@ public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput
synchronized (fDirtyRegionQueue) {
fDirtyRegionQueue.purgeQueue();
}
if (fDocument != null && fDocument.getLength() > 0 && fThread.isDirty() && fThread.isAlive()) {
if (fDocument != null && fDocument.getLength() > 0 && fWorker.isDirty() && fWorker.isAlive()) {
DocumentEvent e= new DocumentEvent(fDocument, 0, fDocument.getLength(), ""); //$NON-NLS-1$
createDirtyRegion(e);
fThread.reset();
fThread.suspendCallerWhileDirty();
fWorker.reset();
fWorker.suspendCallerWhileDirty();
}
}

Expand All @@ -315,7 +320,7 @@ public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {

fDocument.addDocumentListener(this);

if (!fThread.isDirty())
if (!fWorker.isDirty())
aboutToBeReconciledInternal();

startReconciling();
Expand All @@ -325,7 +330,7 @@ public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
/** Queue to manage the changes applied to the text viewer. */
private DirtyRegionQueue fDirtyRegionQueue;
/** The background thread. */
private BackgroundThread fThread;
private BackgroundWorker fWorker;
/** Internal document and text input listener. */
private Listener fListener;
/** The background thread delay. */
Expand Down Expand Up @@ -474,9 +479,9 @@ public void install(ITextViewer textViewer) {
fViewer= textViewer;

synchronized (this) {
if (fThread != null)
if (fWorker != null)
return;
fThread= new BackgroundThread(getClass().getName());
fWorker= new BackgroundWorker(getClass().getName());
}

fDirtyRegionQueue= new DirtyRegionQueue();
Expand Down Expand Up @@ -510,9 +515,9 @@ public void uninstall() {

synchronized (this) {
// http://dev.eclipse.org/bugs/show_bug.cgi?id=19135
BackgroundThread bt= fThread;
fThread= null;
bt.doCancel();
BackgroundWorker bt= fWorker;
fWorker= null;
bt.cancel();
}
}
}
Expand Down Expand Up @@ -617,10 +622,10 @@ protected void forceReconciling() {

if (fDocument != null) {

if (!fThread.isDirty()&& fThread.isAlive())
if (!fWorker.isDirty()&& fWorker.isAlive())
aboutToBeReconciledInternal();

if (fThread.isActive())
if (fWorker.isActive())
fProgressMonitor.setCanceled(true);

if (fIsIncrementalReconciler) {
Expand All @@ -637,14 +642,10 @@ protected void forceReconciling() {
* Clients may extend this method.
*/
protected synchronized void startReconciling() {
if (fThread == null)
if (fWorker == null)
return;

if (!fThread.isAlive()) {
fThread.start();
} else {
fThread.reset();
}
fWorker.startReconciling();
}

/**
Expand All @@ -661,9 +662,8 @@ protected void reconcilerReset() {
* @since 3.4
*/
protected synchronized boolean isRunningInReconcilerThread() {
if (fThread == null) {
if (fWorker == null)
return false;
}
return Job.getJobManager().currentJob() == fThread;
return Thread.currentThread() == fWorker.fThread;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public int getSize() {
return fDirtyRegions.size();
}

public boolean isEmpty() {
return fDirtyRegions.isEmpty();
}

/**
* Throws away all entries in the queue.
*/
Expand Down
4 changes: 2 additions & 2 deletions bundles/org.eclipse.jface/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;singleton:=true
Bundle-Version: 3.37.100.qualifier
Bundle-Version: 3.38.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.jface,
Expand All @@ -18,7 +18,7 @@ Export-Package: org.eclipse.jface,
org.eclipse.jface.fieldassist,
org.eclipse.jface.fieldassist.images,
org.eclipse.jface.images,
org.eclipse.jface.internal;x-friends:="org.eclipse.ui.workbench,org.eclipse.e4.ui.workbench.renderers.swt",
org.eclipse.jface.internal;x-friends:="org.eclipse.ui.workbench,org.eclipse.e4.ui.workbench.renderers.swt,org.eclipse.jface.tests",
org.eclipse.jface.internal.provisional.action;x-friends:="org.eclipse.ui.workbench,org.eclipse.ui.ide",
org.eclipse.jface.layout,
org.eclipse.jface.menus,
Expand Down
Loading
Loading