Skip to content
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

Replace usage of actually internal SWT TypedListener #1766

Merged
merged 1 commit into from
Mar 20, 2024
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
2 changes: 1 addition & 1 deletion bundles/org.eclipse.jface.text/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Export-Package:
Require-Bundle:
org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.text;bundle-version="[3.8.0,4.0.0)";visibility:=reexport,
org.eclipse.swt;bundle-version="[3.117.0,4.0.0)",
org.eclipse.swt;bundle-version="[3.126.0,4.0.0)",
org.eclipse.jface;bundle-version="[3.19.0,4.0.0)"
Import-Package: com.ibm.icu.text
Bundle-RequiredExecutionEnvironment: JavaSE-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TypedListener;

import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
Expand Down Expand Up @@ -599,10 +598,7 @@ public void addMouseListener(MouseListener listener) {
if (listener == fMouseHandler)
super.addMouseListener(listener);
else {
TypedListener typedListener= null;
if (listener != null)
typedListener= new TypedListener(listener);
addListener(SWT.MouseDoubleClick, typedListener);
addTypedListener(listener, SWT.MouseDoubleClick);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.jface/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Export-Package: org.eclipse.jface,
org.eclipse.jface.window,
org.eclipse.jface.wizard,
org.eclipse.jface.wizard.images
Require-Bundle: org.eclipse.swt;bundle-version="[3.111.0,4.0.0)";visibility:=reexport,
Require-Bundle: org.eclipse.swt;bundle-version="[3.126.0,4.0.0)";visibility:=reexport,
org.eclipse.core.commands;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
org.eclipse.equinox.common;bundle-version="[3.18.0,4.0.0)",
org.eclipse.equinox.bidi;bundle-version="[0.10.0,2.0.0)";resolution:=optional
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.ui.forms/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: %name
Bundle-SymbolicName: org.eclipse.ui.forms;singleton:=true
Bundle-Version: 3.13.200.qualifier
Bundle-Version: 3.13.300.qualifier
Bundle-Vendor: %provider-name
Bundle-Localization: plugin
Export-Package: org.eclipse.ui.forms,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.TypedListener;
import org.eclipse.ui.forms.HyperlinkSettings;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.events.IHyperlinkListener;
Expand Down Expand Up @@ -994,12 +993,7 @@ public void removeHyperlinkListener(IHyperlinkListener listener) {
* @since 3.1
*/
public void addSelectionListener(SelectionListener listener) {
checkWidget();
if (listener == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
TypedListener typedListener = new TypedListener(listener);
addListener(SWT.Selection, typedListener);
addTypedListener(listener, SWT.Selection);
}

/**
Expand All @@ -1021,11 +1015,7 @@ public void addSelectionListener(SelectionListener listener) {
* @since 3.1
*/
public void removeSelectionListener(SelectionListener listener) {
checkWidget();
if (listener == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
removeListener(SWT.Selection, listener);
removeTypedListener(SWT.Selection, listener);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions bundles/org.eclipse.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ui; singleton:=true
Bundle-Version: 3.205.100.qualifier
Bundle-Version: 3.206.0.qualifier
Bundle-Activator: org.eclipse.ui.internal.UIPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.ui.internal;x-internal:=true
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.swt;bundle-version="[3.124.0,4.0.0)";visibility:=reexport,
org.eclipse.jface;bundle-version="[3.31.0,4.0.0)";visibility:=reexport,
org.eclipse.swt;bundle-version="[3.126.0,4.0.0)";visibility:=reexport,
org.eclipse.jface;bundle-version="[3.34.0,4.0.0)";visibility:=reexport,
org.eclipse.ui.workbench;bundle-version="[3.130.0,4.0.0)";visibility:=reexport,
org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Expand Down
Loading