Search in sources :

Example 1 with ITraceListListener

use of com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceListListener in project binnavi by google.

the class TraceList method setName.

public void setName(final String name) throws CouldntSaveDataException {
    Preconditions.checkNotNull(name, "IE00784: Name can not be null");
    if (traceName.equals(name)) {
        return;
    }
    sqlProvider.setName(this, name);
    traceName = name;
    for (final ITraceListListener listener : listeners) {
        try {
            listener.changedName(this);
        } catch (final Exception exception) {
            CUtilityFunctions.logException(exception);
        }
    }
}
Also used : ITraceListListener(com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceListListener) CouldntSaveDataException(com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)

Example 2 with ITraceListListener

use of com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceListListener in project binnavi by google.

the class TraceList method addEvent.

/**
   * Adds a trace event to the end of the list.
   *
   * @param event The trace event to add.
   */
public void addEvent(final ITraceEvent event) {
    Preconditions.checkNotNull(event, "IE00781: Trace event can not be null");
    if (traceEvents.contains(event)) {
        throw new IllegalStateException("IE00782: Trace event already belongs to the trace list");
    }
    traceEvents.add(event);
    for (final ITraceListListener listener : listeners) {
        try {
            listener.eventAdded(this, event);
        } catch (final Exception exception) {
            CUtilityFunctions.logException(exception);
        }
    }
}
Also used : ITraceListListener(com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceListListener) CouldntSaveDataException(com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)

Example 3 with ITraceListListener

use of com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceListListener in project binnavi by google.

the class TraceList method setDescription.

public void setDescription(final String description) throws CouldntSaveDataException {
    Preconditions.checkNotNull(description, "IE00783: Comment can not be null");
    if (traceDescription.equals(description)) {
        return;
    }
    sqlProvider.setDescription(this, description);
    traceDescription = description;
    for (final ITraceListListener listener : listeners) {
        try {
            listener.changedDescription(this);
        } catch (final Exception exception) {
            CUtilityFunctions.logException(exception);
        }
    }
}
Also used : ITraceListListener(com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceListListener) CouldntSaveDataException(com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)

Aggregations

CouldntSaveDataException (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)3 ITraceListListener (com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceListListener)3