simplified usage of Watchpoint and WatchpointMote interfaces
This commit is contained in:
parent
090d77c5a2
commit
088f2e12a8
2 changed files with 33 additions and 27 deletions
|
@ -32,24 +32,26 @@
|
||||||
package se.sics.cooja;
|
package se.sics.cooja;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Fredrik Osterlind
|
* @author Fredrik Osterlind
|
||||||
*/
|
*/
|
||||||
public interface Watchpoint {
|
public interface Watchpoint {
|
||||||
|
|
||||||
/**
|
public WatchpointMote getMote();
|
||||||
* @return Short watchpoint description
|
|
||||||
*/
|
|
||||||
public String getDescription();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Mote
|
|
||||||
*/
|
|
||||||
public Mote getMote();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Color
|
|
||||||
*/
|
|
||||||
public Color getColor();
|
public Color getColor();
|
||||||
|
public void setColor(Color newColor);
|
||||||
|
|
||||||
|
public String getDescription();
|
||||||
|
public void setUserMessage(String msg);
|
||||||
|
public String getUserMessage();
|
||||||
|
|
||||||
|
public File getCodeFile();
|
||||||
|
public int getLineNumber();
|
||||||
|
public int getExecutableAddress();
|
||||||
|
|
||||||
|
public void setStopsSimulation(boolean b);
|
||||||
|
public boolean stopsSimulation();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,12 +31,17 @@
|
||||||
|
|
||||||
package se.sics.cooja;
|
package se.sics.cooja;
|
||||||
|
|
||||||
import java.awt.event.ActionListener;
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Fredrik Osterlind
|
* @author Fredrik Osterlind
|
||||||
*/
|
*/
|
||||||
public interface WatchpointMote {
|
public interface WatchpointMote extends Mote {
|
||||||
|
|
||||||
|
public interface WatchpointListener {
|
||||||
|
public void watchpointTriggered(Watchpoint watchpoint);
|
||||||
|
public void watchpointsChanged();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a breakpoint listener.
|
* Adds a breakpoint listener.
|
||||||
|
@ -44,28 +49,27 @@ public interface WatchpointMote {
|
||||||
*
|
*
|
||||||
* @param listener Action listener
|
* @param listener Action listener
|
||||||
*/
|
*/
|
||||||
public void addWatchpointListener(ActionListener listener);
|
public void addWatchpointListener(WatchpointListener listener);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes previously registered listener.
|
* Removes previously registered listener.
|
||||||
*
|
*
|
||||||
* @param listener Listeners
|
* @param listener Listeners
|
||||||
*/
|
*/
|
||||||
public void removeWatchpointListener(ActionListener listener);
|
public void removeWatchpointListener(WatchpointListener listener);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return All registered listeners
|
* @return All registered listeners
|
||||||
*/
|
*/
|
||||||
public ActionListener[] getWatchpointListeners();
|
public WatchpointListener[] getWatchpointListeners();
|
||||||
|
|
||||||
/**
|
public Watchpoint addBreakpoint(File codeFile, int lineNr, int address);
|
||||||
* @return Last triggered watchpoint
|
public void removeBreakpoint(Watchpoint watchpoint);
|
||||||
*/
|
public Watchpoint[] getBreakpoints();
|
||||||
public Watchpoint getLastWatchpoint();
|
|
||||||
|
|
||||||
/**
|
public boolean breakpointExists(int address);
|
||||||
* @return Mote
|
public boolean breakpointExists(File file, int lineNr);
|
||||||
*/
|
|
||||||
public Mote getMote();
|
public Integer getExecutableAddressOf(File file, int lineNr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue