-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow to disable installed plugins (#2277)
- Loading branch information
Showing
33 changed files
with
358 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
jadx-gui/src/main/java/jadx/gui/events/types/JadxGuiEventsImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package jadx.gui.events.types; | ||
|
||
import java.util.function.Consumer; | ||
|
||
import jadx.api.plugins.events.IJadxEvent; | ||
import jadx.api.plugins.events.IJadxEvents; | ||
import jadx.api.plugins.events.JadxEventType; | ||
import jadx.core.plugins.events.JadxEventsImpl; | ||
|
||
/** | ||
* Special events implementation to operate on both: global UI and project events. | ||
* Project events hold listeners only while a project opened and reset them on close. | ||
*/ | ||
public class JadxGuiEventsImpl implements IJadxEvents { | ||
|
||
private final IJadxEvents global = new JadxEventsImpl(); | ||
private final IJadxEvents project = new JadxEventsImpl(); | ||
|
||
public IJadxEvents global() { | ||
return global; | ||
} | ||
|
||
@Override | ||
public void send(IJadxEvent event) { | ||
global.send(event); | ||
project.send(event); | ||
} | ||
|
||
@Override | ||
public <E extends IJadxEvent> void addListener(JadxEventType<E> eventType, Consumer<E> listener) { | ||
project.addListener(eventType, listener); | ||
} | ||
|
||
@Override | ||
public <E extends IJadxEvent> void removeListener(JadxEventType<E> eventType, Consumer<E> listener) { | ||
project.removeListener(eventType, listener); | ||
} | ||
|
||
@Override | ||
public void reset() { | ||
project.reset(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.