Skip to content

Commit 9a1fced

Browse files
author
isayan
committed
ResultFilter JSearchのバグ修正
1 parent da0d857 commit 9a1fced

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ netbeans.org-netbeans-modules-javascript2-requirejs.enabled=true
22
release_version_major=3.0
33
release_version_minor=7.1
44
netbeans.license=mit
5+
netbeans.hint.jdkPlatform=JDK_17

release/YaguraExtension-v3.0.jar

87 Bytes
Binary file not shown.

src/main/java/yagura/view/JSearchTab.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,9 @@ public void keyPressed(KeyEvent ke) {
556556
this.tableResult.getColumnModel().getColumn(5).setMaxWidth(50);
557557

558558
// length
559-
this.tableResult.getColumnModel().getColumn(6).setPreferredWidth(40);
559+
this.tableResult.getColumnModel().getColumn(6).setMinWidth(40);
560+
this.tableResult.getColumnModel().getColumn(6).setPreferredWidth(60);
561+
this.tableResult.getColumnModel().getColumn(6).setMaxWidth(80);
560562

561563
// comment
562564
this.tableResult.getColumnModel().getColumn(7).setPreferredWidth(80);

src/main/java/yagura/view/ResultFilterDlg.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,6 @@ public PropertyRowFilter(FilterProperty filterProp) {
922922
@Override
923923
public boolean include(RowFilter.Entry<? extends Object, ? extends Object> entry) {
924924
boolean allFilter = false;
925-
926925
try {
927926
ProxyHttpRequestResponse item = (ProxyHttpRequestResponse) entry.getValue(0);
928927
boolean showOnlyScopFilter = true;
@@ -967,15 +966,13 @@ public boolean include(RowFilter.Entry<? extends Object, ? extends Object> entry
967966
}
968967
}
969968
// Highlight Color
970-
boolean colorFilter = false;
969+
boolean colorFilter = true;
971970
if (statusFilter && showOnlyScopFilter) {
972971
// cololr
973972
if (this.filterProp.getShowOnlyHighlightColors()) {
974973
EnumSet<MessageHighlightColor> colors = this.filterProp.getHighlightColors();
975974
MessageHighlightColor hc = MessageHighlightColor.valueOf(item.annotations().highlightColor());
976-
if (colors.contains(hc)) {
977-
colorFilter = true;
978-
}
975+
colorFilter = colors.contains(hc);
979976
}
980977
}
981978
// Comment Filter
@@ -1036,8 +1033,13 @@ public boolean include(RowFilter.Entry<? extends Object, ? extends Object> entry
10361033
response = item.response().contains(Pattern.compile(this.filterProp.getResponse(), this.filterProp.isResponseIgnoreCase() ? Pattern.DOTALL : Pattern.DOTALL | Pattern.CASE_INSENSITIVE));
10371034
}
10381035
}
1036+
// ListenerPort
1037+
boolean listenerPort = true;
1038+
if (this.filterProp.getListenerPort() > -1) {
1039+
listenerPort = this.filterProp.getListenerPort() == item.listenerPort();
1040+
}
10391041
// 条件のAND
1040-
allFilter = (statusFilter && colorFilter && commentFilter && matchFilter && showOnlyScopFilter && hideItemsWithoutResponses && parameterizedRequests && editedMessage && requestMethod && requestURL && request && response);
1042+
allFilter = (statusFilter && colorFilter && commentFilter && matchFilter && showOnlyScopFilter && hideItemsWithoutResponses && parameterizedRequests && editedMessage && requestMethod && requestURL && request && response && listenerPort);
10411043
} catch (Exception ex) {
10421044
logger.log(Level.SEVERE, ex.getMessage(), ex);
10431045
}

0 commit comments

Comments
 (0)