--- old/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/FlavorSelector.java 2019-10-22 09:27:14.025043612 -0400 +++ new/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/FlavorSelector.java 2019-10-22 09:27:13.842040996 -0400 @@ -1,6 +1,7 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. - * + * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, Red Hat Inc. All rights reserved. + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * The contents of this file are subject to the terms of either the Universal Permissive License @@ -10,17 +11,17 @@ * * Redistribution and use in source and binary forms, with or without modification, are permitted * provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions * and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials provided with * the distribution. - * + * * 3. Neither the name of the copyright holder nor the names of its contributors may be used to * endorse or promote products derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR @@ -65,7 +66,9 @@ import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; import org.eclipse.ui.forms.widgets.Form; import org.openjdk.jmc.common.IDisplayable; @@ -301,7 +304,6 @@ sameThreadsButton.addSelectionListener(new SameThreadsSelectionListener()); // FIXME: Persist state for above checkboxes? - onShow.ifPresent(on -> { Label rangeLabel = new Label(selectorRow, SWT.NONE); rangeLabel.setLayoutData(GridDataFactory.swtDefaults().create()); @@ -314,6 +316,12 @@ resetButton.setText(Messages.FlavorSelector_BUTTON_TIMERANGE_CLEAR); resetButton.setToolTipText(Messages.FlavorSelector_BUTTON_TIMERANGE_CLEAR_TOOLTIP); resetButton.addListener(SWT.Selection, e -> on.accept(false)); + resetButton.addListener(SWT.Selection, new Listener() { + @Override + public void handleEvent(Event event) { + on.accept(false); + } + }); resetButton.setLayoutData(GridDataFactory.swtDefaults().create()); showButton.addListener(SWT.Selection, e -> on.accept(true)); });