Last active
July 19, 2020 04:09
-
-
Save rahul-lohra/0f1a04b17897bbfba82eec2279b7e835 to your computer and use it in GitHub Desktop.
Import Logic
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
package com.rahul.gqlformat; | |
import com.intellij.openapi.project.Project; | |
import org.apache.http.util.TextUtils; | |
import javax.swing.*; | |
public class GqlView { | |
private JTextArea textArea; | |
private JButton btnImport; | |
private JPanel panel; | |
private JTextField tfVariableName; | |
private JButton btnReplace; | |
private JLabel labelError; | |
private Project project; | |
private EditorLogic editorLogic; | |
Timer errorTimer; | |
public GqlView(Project project) { | |
this.editorLogic = new EditorLogic(); | |
this.project = project; | |
btnImport.addActionListener(actionEvent -> { | |
String variableName = tfVariableName.getText(); | |
if (TextUtils.isEmpty(variableName)) { | |
//Do nothing | |
} else { | |
editorLogic.selectCurrentFile(variableName, project, textArea); | |
} | |
}); | |
} | |
public JPanel getPanel() { | |
return panel; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment