mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15:38 +02:00
Implement ChangeEvent for Variable also.
This commit is contained in:
parent
76dd984256
commit
c1ef37f459
1 changed files with 17 additions and 6 deletions
|
@ -1,21 +1,32 @@
|
||||||
|
/*
|
||||||
|
* (c) Copyright QNX Software Systems Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*/
|
||||||
package org.eclipse.cdt.debug.mi.core.cdi;
|
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
|
import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||||
|
import org.eclipse.cdt.debug.mi.core.event.MIVarChangedEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author alain
|
|
||||||
*
|
|
||||||
* To change this generated comment edit the template variable "typecomment":
|
|
||||||
* Window>Preferences>Java>Templates.
|
|
||||||
* To enable and disable the creation of type comments go to
|
|
||||||
* Window>Preferences>Java>Code Generation.
|
|
||||||
*/
|
*/
|
||||||
public class ChangedEvent implements ICDIChangedEvent {
|
public class ChangedEvent implements ICDIChangedEvent {
|
||||||
|
|
||||||
CSession session;
|
CSession session;
|
||||||
ICDIObject source;
|
ICDIObject source;
|
||||||
|
|
||||||
|
public ChangedEvent(CSession s, MIVarChangedEvent var) {
|
||||||
|
session = s;
|
||||||
|
VariableManager mgr = session.getVariableManager();
|
||||||
|
String varName = var.getVarName();
|
||||||
|
VariableManager.Element element = mgr.getElement(varName);
|
||||||
|
if (element != null && element.variable != null) {
|
||||||
|
source = element.variable;
|
||||||
|
} else {
|
||||||
|
source = new CObject(session.getCTarget());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ChangedEvent(CSession s, ICDIObject src) {
|
public ChangedEvent(CSession s, ICDIObject src) {
|
||||||
session = s;
|
session = s;
|
||||||
source = src;
|
source = src;
|
||||||
|
|
Loading…
Add table
Reference in a new issue