From c827c8e164623c7fbc91bf6cce244c0be64f0b39 Mon Sep 17 00:00:00 2001 From: Carlos Ortiz Date: Fri, 13 Sep 2024 21:28:26 -0600 Subject: [PATCH] Remove ListenerDataContext.java Deleted ListenerDataContext.java as it is no longer needed. The functionality has been integrated into a different component, simplifying the overall architecture and reducing redundant code. --- .../jks/actions/ListenerDataContext.java | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/main/java/com/jmpeax/ssltoolbox/jks/actions/ListenerDataContext.java diff --git a/src/main/java/com/jmpeax/ssltoolbox/jks/actions/ListenerDataContext.java b/src/main/java/com/jmpeax/ssltoolbox/jks/actions/ListenerDataContext.java deleted file mode 100644 index cefff6f..0000000 --- a/src/main/java/com/jmpeax/ssltoolbox/jks/actions/ListenerDataContext.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jmpeax.ssltoolbox.jks.actions; - -import com.intellij.openapi.actionSystem.DataContext; -import com.intellij.openapi.actionSystem.DataKey; -import com.intellij.openapi.vfs.VirtualFile; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.security.cert.X509Certificate; - -public class ListenerDataContext implements DataContext { - private final VirtualFile file; - private final OnImport onImport; - - public ListenerDataContext(VirtualFile file,OnImport onImport) { - this.file = file; - this.onImport = onImport; - } - - @Override - public @Nullable Object getData(@NotNull String dataId) { - return file; - } - - @Override - public @Nullable T getData(@NotNull DataKey key) { - return DataContext.super.getData(key); - } - - public void update(String alias, X509Certificate certificate){ - onImport.imported(alias,certificate); - } - - interface OnImport { - void imported(String alias, X509Certificate cert); - } -}