Skip to content

Commit 9954327

Browse files
committed
Open the Options panel when remove action is run on a default query node
- Remove action is run even if canRemove is false. - The action do nothing now. - Instead open the options panel.
1 parent 6ec531f commit 9954327

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/main/java/com/junichi11/netbeans/modules/github/issues/query/GitHubDefaultQuery.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
package com.junichi11.netbeans.modules.github.issues.query;
4343

4444
import com.junichi11.netbeans.modules.github.issues.repository.GitHubRepository;
45+
import com.junichi11.netbeans.modules.github.issues.utils.UiUtils;
46+
import javax.swing.SwingUtilities;
4547

4648
abstract class GitHubDefaultQuery extends GitHubQuery {
4749

@@ -70,6 +72,13 @@ public final boolean canRemove() {
7072

7173
@Override
7274
public void remove() {
73-
// noop
75+
// XXX can remove a query even if canRemove is false
76+
// open options panel as a workaround
77+
SwingUtilities.invokeLater(new Runnable() {
78+
@Override
79+
public void run() {
80+
UiUtils.showOptions();
81+
}
82+
});
7483
}
7584
}

0 commit comments

Comments
 (0)