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
fun replaceDollar(inputString: String):String{ | |
var finalText = inputString | |
val indexesToIgnore = hashSetOf<Int>() | |
val patternsToIgnore = arrayListOf("\\$\\$","\\$\\{\"\\$\"}") | |
patternsToIgnore.forEach { | |
val doubleDollarPattern = Pattern.compile(it) | |
val matcher = doubleDollarPattern.matcher(inputString) | |
while (matcher.find()) { |
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; |
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
class EditorLogic { | |
val nodeCreator = NodeCreator() | |
var expressionElement: PsiElement? = null | |
fun selectCurrentFile(variableName: String, project: Project, textArea: JTextArea) { | |
reset() | |
val fileEditorManager = FileEditorManager.getInstance(project) | |
val virtualFile = fileEditorManager.openFiles |
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
</idea-plugin> | |
<extensions defaultExtensionNs="com.intellij"> | |
<toolWindow | |
id="Gql Format" anchor="right" factoryClass="com.rahul.gqlformat.MyToolWindow"> | |
</toolWindow> | |
</extensions> | |
</idea-plugin> |
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 com.intellij.openapi.wm.ToolWindow | |
import com.intellij.openapi.wm.ToolWindowFactory | |
import com.intellij.ui.content.ContentFactory | |
class MyToolWindow : ToolWindowFactory { | |
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) { |
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 javax.swing.*; | |
public class GqlView { | |
private JTextArea textArea; | |
private JButton btnImport; | |
private JPanel panel; | |
private JTextField tfVariableName; |
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
<idea-plugin> | |
<id>com.awesome.formatter</id> <!--Enter your package, it should be unique--> | |
<name>Awesome GQL Formatter</name> | |
<vendor email="tgunix@gmail.com" url="http://www.rahullohra.com">RahulLohra</vendor> | |
<description><![CDATA[ | |
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum.<br> | |
Lorem ipsum | |
]]></description> |
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
main(List<String> args) { | |
Button btn = new Button(); | |
btn.setCallback((a){ | |
print(a); | |
}); | |
for(int i=0;i<4;++i){ | |
btn.tap(); | |
} | |
} |
NewerOlder