Search in sources :

Example 1 with EmptyComment

use of com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.EmptyComment in project binnavi by google.

the class LocalInstructionCommentAccessor method getAllComments.

@Override
public ArrayList<Pair<INaviInstruction, IComment>> getAllComments() {
    final ArrayList<Pair<INaviInstruction, IComment>> values = new ArrayList<>();
    final CCodeNodeComments currentComments = m_codeNode.getComments();
    for (final INaviInstruction instruction : m_codeNode.getInstructions()) {
        final List<IComment> comments = currentComments.getLocalInstructionComment(instruction);
        if ((comments == null) || comments.isEmpty()) {
            values.add(new Pair<INaviInstruction, IComment>(instruction, new EmptyComment()));
            continue;
        } else {
            for (final IComment comment : comments) {
                values.add(new Pair<INaviInstruction, IComment>(instruction, comment));
            }
            values.add(new Pair<INaviInstruction, IComment>(instruction, new EmptyComment()));
        }
    }
    return values;
}
Also used : EmptyComment(com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.EmptyComment) IComment(com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.Interfaces.IComment) CCodeNodeComments(com.google.security.zynamics.binnavi.disassembly.CCodeNodeComments) ArrayList(java.util.ArrayList) Pair(com.google.security.zynamics.zylib.general.Pair) INaviInstruction(com.google.security.zynamics.binnavi.disassembly.INaviInstruction)

Aggregations

EmptyComment (com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.EmptyComment)1 IComment (com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.Interfaces.IComment)1 CCodeNodeComments (com.google.security.zynamics.binnavi.disassembly.CCodeNodeComments)1 INaviInstruction (com.google.security.zynamics.binnavi.disassembly.INaviInstruction)1 Pair (com.google.security.zynamics.zylib.general.Pair)1 ArrayList (java.util.ArrayList)1