KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > registers > RegistersViewEventHandler


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

11
12 package org.eclipse.debug.internal.ui.views.registers;
13
14 import org.eclipse.debug.core.DebugEvent;
15 import org.eclipse.debug.core.model.IRegisterGroup;
16 import org.eclipse.debug.internal.ui.views.variables.VariablesViewEventHandler;
17 import org.eclipse.debug.ui.AbstractDebugView;
18
19 public class RegistersViewEventHandler extends VariablesViewEventHandler {
20
21     public RegistersViewEventHandler(AbstractDebugView view) {
22         super(view);
23     }
24
25     protected boolean isFiltered(DebugEvent event) {
26         if (event.getKind() == DebugEvent.CHANGE) {
27             Object JavaDoc source = event.getSource();
28             switch (event.getDetail()) {
29                 case DebugEvent.CONTENT:
30                     if (source instanceof IRegisterGroup) {
31                         return false;
32                     }
33                     break;
34                 case DebugEvent.STATE:
35                     if (source instanceof IRegisterGroup) {
36                         return false;
37                     }
38                     break;
39                 default: // UNSPECIFIED
40
break;
41             }
42         }
43         return super.isFiltered(event);
44     }
45 }
46
Popular Tags