KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > misc > TestSelectionListener


1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.misc;
12
13 import org.eclipse.jface.viewers.*;
14 import org.eclipse.ui.*;
15
16 /**
17  * Print out selection listener events.
18  */

19 public class TestSelectionListener implements org.eclipse.ui.ISelectionListener {
20 /**
21  * TestSelectionListener constructor comment.
22  */

23 public TestSelectionListener() {
24     super();
25 }
26 /**
27  * Notifies this listener that the selection has changed.
28  *
29  * @param part the workbench part containing the selection
30  * @param selection the new selection, or <code>null</code> if none
31  */

32 public void selectionChanged(IWorkbenchPart part, ISelection selection) {
33     System.out.println("selectionChanged(" + selection + ")");//$NON-NLS-2$//$NON-NLS-1$
34
}
35 }
36
Popular Tags