KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > core > refactoring > WatchpointChange


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 package org.eclipse.jdt.internal.debug.core.refactoring;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.jdt.debug.core.IJavaWatchpoint;
15
16 /**
17  * @since 3.2
18  *
19  */

20 public abstract class WatchpointChange extends LineBreakpointChange {
21     
22     private String JavaDoc fFieldName;
23     private boolean fAccess, fModification;
24
25     public WatchpointChange(IJavaWatchpoint watchpoint) throws CoreException {
26         super(watchpoint);
27         fFieldName = watchpoint.getFieldName();
28         fAccess = watchpoint.isAccess();
29         fModification = watchpoint.isModification();
30     }
31     
32     protected String JavaDoc getFieldName() {
33         return fFieldName;
34     }
35     
36     protected void apply(IJavaWatchpoint breakpoint) throws CoreException {
37         super.apply(breakpoint);
38         breakpoint.setAccess(fAccess);
39         breakpoint.setModification(fModification);
40     }
41 }
42
Popular Tags