Exemplo n.º 1
0
    @Override
    public void deletedView(final INaviModule module, final INaviView view) {
      final View deletedView = ObjectFinders.getObject(view, m_views);

      m_views.remove(deletedView);

      for (final IModuleListener listener : m_listeners) {
        try {
          listener.deletedView(Module.this, deletedView);
        } catch (final Exception exception) {
          CUtilityFunctions.logException(exception);
        }
      }
    }
Exemplo n.º 2
0
    @Override
    public void deletedTrace(final CTraceContainer container, final TraceList trace) {
      final Trace deletedTrace = ObjectFinders.getObject(trace, m_traces);

      m_traces.remove(deletedTrace);

      for (final IModuleListener listener : m_listeners) {
        try {
          listener.deletedTrace(Module.this, deletedTrace);
        } catch (final Exception exception) {
          CUtilityFunctions.logException(exception);
        }
      }
    }
Exemplo n.º 3
0
    @Override
    public void removedThread(final TargetProcessThread thread) {
      final Thread apiThread = ObjectFinders.getObject(thread, threads);

      threads.remove(apiThread);

      for (final IProcessListener listener : listeners) {
        try {
          listener.removedThread(Process.this, apiThread);
        } catch (final Exception e) {
          CUtilityFunctions.logException(e);
        }
      }
    }
Exemplo n.º 4
0
    @Override
    public void removedModule(
        final com.google.security.zynamics.binnavi.debug.models.processmanager.MemoryModule
            module) {
      final MemoryModule apiModule = ObjectFinders.getObject(module, modules);

      modules.remove(apiModule);

      for (final IProcessListener listener : listeners) {
        try {
          listener.removedModule(Process.this, apiModule);
        } catch (final Exception e) {
          CUtilityFunctions.logException(e);
        }
      }
    }
Exemplo n.º 5
0
    @Override
    public void changedDebuggerTemplate(
        final INaviModule module,
        final com.google.security.zynamics.binnavi.debug.debugger.DebuggerTemplate template) {
      final DebuggerTemplate newTemplate =
          template == null
              ? null
              : ObjectFinders.getObject(
                  template, m_database.getDebuggerTemplateManager().getDebuggerTemplates());

      m_debuggerTemplate = newTemplate;

      for (final IModuleListener listener : m_listeners) {
        try {
          listener.changedDebuggerTemplate(Module.this, newTemplate);
        } catch (final Exception exception) {
          CUtilityFunctions.logException(exception);
        }
      }
    }
Exemplo n.º 6
0
  /**
   * Creates a new view that is added to the module.
   *
   * @param name The name of the new view.
   * @param description The description of the new view.
   * @return The newly created view.
   * @throws IllegalArgumentException Thrown if any of the arguments are null.
   */
  @Override
  public View createView(final String name, final String description) {
    final CView newView = m_module.getContent().getViewContainer().createView(name, description);

    return ObjectFinders.getObject(newView, m_views);
  }
 /**
  * Finds the API database object that represents a given database object.
  *
  * @return The API database object.
  */
 private Database getPluginDatabase() {
   return ObjectFinders.getObject(
       database, PluginInterface.instance().getDatabaseManager().getDatabases());
 }