Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2020-01-09 10:36:35 +0000
committerAlexander Kurtakov2020-01-09 10:36:35 +0000
commit5bbfa969c3af244dcd50e3fc1d0a1a6456eeb242 (patch)
tree2f90c24f7c8d1ea1eba8a4757d6624df61d32dd6 /org.eclipse.m2e.jdt.ui
parent6bbd6cb32c2166d23a3d67056d139d0e81d7f47b (diff)
downloadm2e-core-5bbfa969c3af244dcd50e3fc1d0a1a6456eeb242.tar.gz
m2e-core-5bbfa969c3af244dcd50e3fc1d0a1a6456eeb242.tar.xz
m2e-core-5bbfa969c3af244dcd50e3fc1d0a1a6456eeb242.zip
Move from SelectionAdapter to SelectionListener default methods.
Fixes many synthetic access warnings. Change-Id: I4c4c7da0354bb0bfbc3c34ba35df1b577e816164 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.m2e.jdt.ui')
-rw-r--r--org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/MavenClasspathContainerPage.java24
1 files changed, 10 insertions, 14 deletions
diff --git a/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/MavenClasspathContainerPage.java b/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/MavenClasspathContainerPage.java
index 62c58886..1f958187 100644
--- a/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/MavenClasspathContainerPage.java
+++ b/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/MavenClasspathContainerPage.java
@@ -19,8 +19,7 @@ import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
import org.eclipse.jdt.ui.wizards.IClasspathContainerPageExtension;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -28,7 +27,6 @@ import org.eclipse.swt.widgets.Link;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.m2e.core.internal.IMavenConstants;
-import org.eclipse.m2e.jdt.ui.internal.Messages;
/**
@@ -36,8 +34,8 @@ import org.eclipse.m2e.jdt.ui.internal.Messages;
*
* @author Eugene Kuleshov
*/
-public class MavenClasspathContainerPage extends WizardPage implements IClasspathContainerPage,
- IClasspathContainerPageExtension {
+public class MavenClasspathContainerPage extends WizardPage
+ implements IClasspathContainerPage, IClasspathContainerPageExtension {
IJavaProject javaProject;
@@ -75,15 +73,13 @@ public class MavenClasspathContainerPage extends WizardPage implements IClasspat
Link link = new Link(composite, SWT.NONE);
link.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
link.setText(Messages.MavenClasspathContainerPage_link);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- // IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer();
- // container.openPage(MavenProjectPreferencePage.ID, javaProject.getProject());
-
- PreferencesUtil.createPropertyDialogOn(getShell(), javaProject.getProject(), //
- IMavenConstants.PREFERENCE_PAGE_ID, new String[] {IMavenConstants.PREFERENCE_PAGE_ID}, null).open();
- }
- });
+ link.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
+ // IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer();
+ // container.openPage(MavenProjectPreferencePage.ID, javaProject.getProject());
+
+ PreferencesUtil.createPropertyDialogOn(getShell(), javaProject.getProject(), //
+ IMavenConstants.PREFERENCE_PAGE_ID, new String[] {IMavenConstants.PREFERENCE_PAGE_ID}, null).open();
+ }));
}
public boolean finish() {

Back to the top