Skip to content

Commit

Permalink
Add "Find" command and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
breandan committed Mar 10, 2016
1 parent 68558b6 commit afacc2e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main/java/com/jetbrains/idear/asr/ASRControlLoop.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ private void applyAction(String c) {
} else if (c.startsWith("end")) {
ideService.type(VK_META, VK_RIGHT);
}
} else if (c.startsWith("find in")) {
if(c.endsWith("file")) {
ideService.invokeAction("Find");
} else if(c.endsWith("project")) {
ideService.invokeAction("FindInPath");
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<![CDATA[
<html>
<dl>
<dt>1.3</dt>
<dd>Editing commands and bug fixes.</dd>
<dt>1.2.1</dt>
<dd>Add a dedicated Kotlin runtime to dependencies.</dd>
<dt>1.2</dt>
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/com.jetbrains.idear/grammars/command.gram
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ grammar dialog;

<text_command> = enter text | enter camel case;

<find_command> = find in file | find in project;

public <command> = <init_command> |
<activation_command> |
<menu_command> |
Expand All @@ -81,4 +83,5 @@ public <command> = <init_command> |
<search_command> |
<code_command> |
<speech_command> |
<text_command>;
<text_command> |
<find_command>;

0 comments on commit afacc2e

Please sign in to comment.