Skip to content

Commit

Permalink
set break options handler in core
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan Gupta <[email protected]>
  • Loading branch information
aryangupta701 committed Mar 23, 2024
1 parent 04f3dbb commit 2af2430
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions addOns/brk/src/main/java/org/zaproxy/addon/brk/ExtensionBreak.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.event.KeyEvent;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -33,6 +35,7 @@
import javax.swing.JList;
import javax.swing.JTree;
import javax.swing.tree.TreePath;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.parosproxy.paros.Constant;
Expand All @@ -43,6 +46,7 @@
import org.parosproxy.paros.extension.ExtensionHookView;
import org.parosproxy.paros.extension.OptionsChangedListener;
import org.parosproxy.paros.extension.SessionChangedListener;
import org.parosproxy.paros.extension.option.ExtensionOption;
import org.parosproxy.paros.model.HistoryReference;
import org.parosproxy.paros.model.OptionsParam;
import org.parosproxy.paros.model.Session;
Expand Down Expand Up @@ -115,6 +119,13 @@ public String getUIName() {
@Override
public void init() {
serialisationRequiredListeners = Collections.synchronizedList(new ArrayList<>(1));
try {
ExtensionOption extOption = Control.getSingleton().getExtensionLoader().getExtension(ExtensionOption.class);
Method method = extOption.getClass().getDeclaredMethod("setBreakOptionsHandler");
method.invoke(extOption, this.getOptionsParam()::setShowIgnoreFilesButtons);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}

public BreakpointManagementInterface getBreakpointManagementInterface() {
Expand Down

0 comments on commit 2af2430

Please sign in to comment.