Skip to content

Commit

Permalink
rename plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
breandan committed Jan 1, 2023
1 parent d7d9a0a commit d5952a9
Show file tree
Hide file tree
Showing 101 changed files with 692 additions and 692 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/out/

# Plugin Development
idear.zip
idiolect.zip

### Gradle template
.gradle
Expand Down
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ![idear icon](src%2Fmain%2Fresources%2FMETA-INF%2FpluginIcon.svg) idear
# ![idiolect icon](src%2Fmain%2Fresources%2FMETA-INF%2FpluginIcon.svg) idiolect

[![][jetbrains-team-svg]][jetbrains-team-page]
[![Deploy](https://github.com/OpenASR/idear/workflows/Deploy/badge.svg)](https://github.com/OpenASR/idear/actions?query=workflow%3ABuild)
[![Deploy](https://github.com/OpenASR/idiolect/workflows/Deploy/badge.svg)](https://github.com/OpenASR/idiolect/actions?query=workflow%3ABuild)
[![][teamcity-status-svg]][teamcity-build-status]
[![][plugin-repo-svg]][plugin-repo-page]
[![][plugin-download-svg]][plugin-repo-page]
Expand All @@ -11,17 +11,17 @@ Possible use cases: visually impaired and [RSI](https://en.wikipedia.org/wiki/Re

## Usage

To get started, press the <img src="src/main/resources/org/openasr/idear/icons/start.svg" height="24" alt="Voice control"/> button in the toolbar, then speak a command, e.g. "Hi, IDEA!" Idear supports a simple [grammar](src/main/resources/org/openasr/idear/grammars/command.gram). For a complete list of commands, please refer to [the wiki](https://github.com/OpenASR/idear/wiki/Feature-Roadmap#features). Click the button once more to deactivate.
To get started, press the <img src="src/main/resources/org/openasr/idiolect/icons/start.svg" height="24" alt="Voice control"/> button in the toolbar, then speak a command, e.g. "Hi, IDEA!" Idiolect supports a simple [grammar](src/main/resources/org/openasr/idiolect/grammars/command.gram). For a complete list of commands, please refer to [the wiki](https://github.com/OpenASR/idiolect/wiki/Feature-Roadmap#features). Click the button once more to deactivate.

## Building

For Linux or macOS users:

`git clone https://github.com/OpenASR/idear && cd idear && ./gradlew runIde`
`git clone https://github.com/OpenASR/idiolect && cd idiolect && ./gradlew runIde`

For Windows users:

`git clone https://github.com/OpenASR/idear & cd idear & gradlew.bat runIde`
`git clone https://github.com/OpenASR/idiolect & cd idiolect & gradlew.bat runIde`

Recognition works with most popular microphones (preferably 16kHz, 16-bit). For best results, minimize background noise.

Expand All @@ -33,27 +33,27 @@ Contributors who have IntelliJ IDEA installed can simply open the project. Other

## Architecture

Idear is implemented using the [IntelliJ Platform SDK](https://www.jetbrains.org/intellij/sdk/docs/intro/welcome.html). For more information about the plugin architecture, please refer to [the wiki page](https://github.com/OpenASR/idear/wiki/Architecture).
Idiolect is implemented using the [IntelliJ Platform SDK](https://www.jetbrains.org/intellij/sdk/docs/intro/welcome.html). For more information about the plugin architecture, please refer to [the wiki page](https://github.com/OpenASR/idiolect/wiki/Architecture).

### Plugin Actions

[plugin.xml](src/main/resources/META-INF/plugin.xml) defines `<action>`s:

#### [`VoiceRecordControllerAction`](src/main/java/org/openasr/idear/VoiceRecordControllerAction.kt)
This action is invoked when the user clicks on the <img src="src/main/resources/org/openasr/idear/icons/start.svg" height="24" alt="Voice control"/> button in the toolbar.
This simply tells [`AsrService`](src/main/java/org/openasr/idear/asr/AsrService.kt) to activate or standby.
When the `AsrService` is active, the [`ASRSystem`](src/main/java/org/openasr/idear/asr/ASRSystem.kt),
#### [`VoiceRecordControllerAction`](src/main/java/org/openasr/idiolect/VoiceRecordControllerAction.kt)
This action is invoked when the user clicks on the <img src="src/main/resources/org/openasr/idiolect/icons/start.svg" height="24" alt="Voice control"/> button in the toolbar.
This simply tells [`AsrService`](src/main/java/org/openasr/idiolect/asr/AsrService.kt) to activate or standby.
When the `AsrService` is active, the [`ASRSystem`](src/main/java/org/openasr/idiolect/asr/ASRSystem.kt),
by default [`ASRControlLoop`][ASRControlLoop] [(see below)](#ASRControlLoop).

#### [`ExecuteActionFromPredefinedText`](src/main/java/org/openasr/idear/actions/ExecuteActionFromPredefinedText.kt)
A debugging aid to use one of the [**`ActionRecognizer`**](src/main/java/org/openasr/idear/actions/recognition/ActionRecognizer.kt)
extension classes configured in `plugin.xml` to generate an [`ActionCallInfo`](src/main/java/org/openasr/idear/actions/recognition/ActionCallInfo.kt)
which is then [`runInEditor()`](src/main/java/org/openasr/idear/actions/ExecuteActionByCommandText.kt#L25).
#### [`ExecuteActionFromPredefinedText`](src/main/java/org/openasr/idiolect/actions/ExecuteActionFromPredefinedText.kt)
A debugging aid to use one of the [**`ActionRecognizer`**](src/main/java/org/openasr/idiolect/actions/recognition/ActionRecognizer.kt)
extension classes configured in `plugin.xml` to generate an [`ActionCallInfo`](src/main/java/org/openasr/idiolect/actions/recognition/ActionCallInfo.kt)
which is then [`runInEditor()`](src/main/java/org/openasr/idiolect/actions/ExecuteActionByCommandText.kt#L25).

#### [`ExecuteVoiceCommandAction`](src/main/java/org/openasr/idear/actions/ExecuteVoiceCommandAction.kt)
Similar to `ExecuteActionFromPredefinedText` but uses the `Idear.VoiceCommand.Text` data attached to the invoking `AnActionEvent`.
#### [`ExecuteVoiceCommandAction`](src/main/java/org/openasr/idiolect/actions/ExecuteVoiceCommandAction.kt)
Similar to `ExecuteActionFromPredefinedText` but uses the `Idiolect.VoiceCommand.Text` data attached to the invoking `AnActionEvent`.

#### [`WhereAmIAction`](src/main/java/org/openasr/idear/actions/WhereAmIAction.kt)
#### [`WhereAmIAction`](src/main/java/org/openasr/idiolect/actions/WhereAmIAction.kt)

#### IDEA Actions

Expand All @@ -66,30 +66,30 @@ There are many Actions (classes which extend `AnAction`) provided by IDEA:

### ActionRecognizer

#### [`ExtractActionRecognizer`](src/main/java/org/openasr/idear/actions/recognition/ExtractActionRecognizer.kt)
#### [`ExtractActionRecognizer`](src/main/java/org/openasr/idiolect/actions/recognition/ExtractActionRecognizer.kt)
"extract variable|field (to) (new Name)"

#### [`InlineActionRecognizer`](src/main/java/org/openasr/idear/actions/recognition/InlineActionRecognizer.kt)
#### [`InlineActionRecognizer`](src/main/java/org/openasr/idiolect/actions/recognition/InlineActionRecognizer.kt)
"inline"

#### [`RunActionRecognizer`](src/main/java/org/openasr/idear/actions/recognition/RunActionRecognizer.kt)
#### [`RunActionRecognizer`](src/main/java/org/openasr/idiolect/actions/recognition/RunActionRecognizer.kt)
"run"

#### [`DebugActionRecognizer`](src/main/java/org/openasr/idear/actions/recognition/DebugActionRecognizer.kt)
#### [`DebugActionRecognizer`](src/main/java/org/openasr/idiolect/actions/recognition/DebugActionRecognizer.kt)
"debug"

#### [`FindUsagesActionRecognizer`](src/main/java/org/openasr/idear/actions/recognition/FindUsagesActionRecognizer.kt)
#### [`FindUsagesActionRecognizer`](src/main/java/org/openasr/idiolect/actions/recognition/FindUsagesActionRecognizer.kt)
"find (field|method)"

#### [`RenameActionRecognizer`](src/main/java/org/openasr/idear/actions/recognition/RenameActionRecognizer.kt)
#### [`RenameActionRecognizer`](src/main/java/org/openasr/idiolect/actions/recognition/RenameActionRecognizer.kt)
"rename"


### ASRControlLoop

When [`ASRControlLoop`][ASRControlLoop] detects an utterance, it invokes
[`PatternBasedNlpProvider.processUtterance()`](src/main/java/org/openasr/idear/nlp/PatternBasedNlpProvider.kt#L43)
which typically calls `invokeAction()` and/or one or more of the methods of [`IDEService`](src/main/java/org/openasr/idear/ide/IDEService.kt)
[`PatternBasedNlpProvider.processUtterance()`](src/main/java/org/openasr/idiolect/nlp/PatternBasedNlpProvider.kt#L43)
which typically calls `invokeAction()` and/or one or more of the methods of [`IDEService`](src/main/java/org/openasr/idiolect/ide/IDEService.kt)

## Programming By Voice

Expand All @@ -105,13 +105,13 @@ which typically calls `invokeAction()` and/or one or more of the methods of [`ID
<!-- Badges -->
[jetbrains-team-page]: https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub
[jetbrains-team-svg]: http://jb.gg/badges/team.svg
[travis-build-status]: https://travis-ci.com/OpenASR/idear
[travis-status-svg]: https://travis-ci.com/OpenASR/idear.svg?branch=master
[teamcity-build-status]: https://teamcity.jetbrains.com/viewType.html?buildTypeId=idear_buildplugin&guest=1
[teamcity-status-svg]: https://teamcity.jetbrains.com/app/rest/builds/buildType:idear_buildplugin/statusIcon.svg
[plugin-repo-page]: https://plugins.jetbrains.com/plugin/7910-idear
[plugin-repo-svg]: https://img.shields.io/jetbrains/plugin/v/7910-idear.svg
[plugin-download-svg]: https://img.shields.io/jetbrains/plugin/d/7910-idear.svg
[travis-build-status]: https://travis-ci.com/OpenASR/idiolect
[travis-status-svg]: https://travis-ci.com/OpenASR/idiolect.svg?branch=master
[teamcity-build-status]: https://teamcity.jetbrains.com/viewType.html?buildTypeId=idiolect_buildplugin&guest=1
[teamcity-status-svg]: https://teamcity.jetbrains.com/app/rest/builds/buildType:idiolect_buildplugin/statusIcon.svg
[plugin-repo-page]: https://plugins.jetbrains.com/plugin/7910-idiolect
[plugin-repo-svg]: https://img.shields.io/jetbrains/plugin/v/7910-idiolect.svg
[plugin-download-svg]: https://img.shields.io/jetbrains/plugin/d/7910-idiolect.svg


[ASRControlLoop]: src/main/java/org/openasr/idear/asr/ASRControlLoop.kt
[ASRControlLoop]: src/main/java/org/openasr/idiolect/asr/ASRControlLoop.kt
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))

intellij {
version.set("2022.3.1")
pluginName.set("idear")
pluginName.set("idiolect")
updateSinceUntilBuild.set(false)
plugins.set(listOf("java"))
}
Expand Down Expand Up @@ -44,7 +44,7 @@ tasks {

buildPlugin {
dependsOn("test")
archiveFileName.set("idear.zip")
archiveFileName.set("idiolect.zip")
}

runIde {
Expand Down
2 changes: 1 addition & 1 deletion design/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/example-phrases.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

## Idear Commands
## Idiolect Commands
- hi idea
- tell me about yourself
- stop listening
Expand Down Expand Up @@ -1039,4 +1039,4 @@
- x swo document
- zoom current window
- edit run configurations
- open assert equals diff
- open assert equals diff
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rootProject.name = "idear"
rootProject.name = "idiolect"

includeBuild("jAdapterForNativeTTS")
8 changes: 0 additions & 8 deletions src/main/java/org/openasr/idear/actions/IdearAction.kt

This file was deleted.

8 changes: 0 additions & 8 deletions src/main/java/org/openasr/idear/presentation/Icons.kt

This file was deleted.

11 changes: 0 additions & 11 deletions src/main/java/org/openasr/idear/tts/TtsService.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package org.openasr.idear.actions
package org.openasr.idiolect.actions

import com.intellij.openapi.actionSystem.IdeActions.*
import com.intellij.openapi.application.ApplicationInfo
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.util.SystemInfo
import org.openasr.idear.utils.WordToNumberConverter
import org.openasr.idear.asr.AsrService
import org.openasr.idear.asr.ListeningState
import org.openasr.idear.ide.IdeService
import org.openasr.idear.nlp.Commands
import org.openasr.idear.tts.TtsService
import org.openasr.idear.utils.toUpperCamelCase
import org.openasr.idiolect.utils.WordToNumberConverter
import org.openasr.idiolect.asr.AsrService
import org.openasr.idiolect.asr.ListeningState
import org.openasr.idiolect.ide.IdeService
import org.openasr.idiolect.nlp.Commands
import org.openasr.idiolect.tts.TtsService
import org.openasr.idiolect.utils.toUpperCamelCase
import java.awt.event.KeyEvent.*
import java.text.SimpleDateFormat
import javax.sound.sampled.AudioSystem
Expand Down Expand Up @@ -252,7 +252,7 @@ object ActionRoutines {
try {
val clip = AudioSystem.getClip()
val inputStream = AudioSystem.getAudioInputStream(
AsrService.javaClass.getResourceAsStream("/org/openasr/idear/sounds/beep.wav"))
AsrService.javaClass.getResourceAsStream("/org/openasr/idiolect/sounds/beep.wav"))
clip.open(inputStream)
clip.start()
} catch (e: Exception) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.openasr.idear.actions
package org.openasr.idiolect.actions

import com.intellij.openapi.actionSystem.*
import com.intellij.openapi.actionSystem.IdeActions.ACTION_EDITOR_NEXT_TEMPLATE_VARIABLE
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.actionSystem.TypedAction
import org.openasr.idear.actions.recognition.*
import org.openasr.idear.ide.*
import org.openasr.idiolect.actions.recognition.*
import org.openasr.idiolect.ide.*

abstract class ExecuteActionByCommandText : IdearAction() {
abstract class ExecuteActionByCommandText : IdiolectAction() {
private val log = logger<ExecuteActionByCommandText>()

override fun update(e: AnActionEvent) =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package org.openasr.idear.actions
package org.openasr.idiolect.actions

import com.intellij.openapi.actionSystem.AnActionEvent
import org.openasr.idear.actions.recognition.ActionRecognizerManager
import org.openasr.idear.ide.IdeService
import org.openasr.idear.nlp.NlpRequest
import org.openasr.idiolect.actions.recognition.ActionRecognizerManager
import org.openasr.idiolect.ide.IdeService
import org.openasr.idiolect.nlp.NlpRequest

/**
* A debugging aid to use one of the
* [org.openasr.idear.actions.recognition.ActionRecognizer]
* [org.openasr.idiolect.actions.recognition.ActionRecognizer]
* extension classes configured in plugin.xml to generate
* an [org.openasr.idear.actions.recognition.ActionCallInfo] which is then
* [org.openasr.idear.actions.ExecuteActionByCommandText.runInEditor]
* an [org.openasr.idiolect.actions.recognition.ActionCallInfo] which is then
* [org.openasr.idiolect.actions.ExecuteActionByCommandText.runInEditor]
*/
object ExecuteActionFromPredefinedText : ExecuteActionByCommandText() {
override fun actionPerformed(e: AnActionEvent) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.openasr.idear.actions
package org.openasr.idiolect.actions

import com.intellij.openapi.actionSystem.*
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.diagnostic.logger
import org.openasr.idear.actions.recognition.ActionRecognizerManager
import org.openasr.idear.ide.IdeService
import org.openasr.idear.nlp.NlpResultListener.Companion.NLP_RESULT_TOPIC
import org.openasr.idiolect.actions.recognition.ActionRecognizerManager
import org.openasr.idiolect.ide.IdeService
import org.openasr.idiolect.nlp.NlpResultListener.Companion.NLP_RESULT_TOPIC

/**
* Similar to ExecuteActionFromPredefinedText but uses the `VoiceCommand.Text` data attached to the invoking `AnActionEvent`
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/org/openasr/idiolect/actions/IdiolectAction.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.openasr.idiolect.actions

import com.intellij.openapi.actionSystem.AnAction
import org.openasr.idiolect.ide.IdeService.invokeAction

abstract class IdiolectAction : AnAction() {
operator fun invoke() = invokeAction(this)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.openasr.idear.actions

import org.openasr.idear.nlp.NlpRequest
import java.awt.Component
import java.awt.event.KeyEvent

class SpeechEvent(source: Component, id: Int, time: Long, val nlpRequest: NlpRequest)
: KeyEvent(source, id, time, 0, 0, 's', 0)
package org.openasr.idiolect.actions

import org.openasr.idiolect.nlp.NlpRequest
import java.awt.Component
import java.awt.event.KeyEvent

class SpeechEvent(source: Component, id: Int, time: Long, val nlpRequest: NlpRequest)
: KeyEvent(source, id, time, 0, 0, 's', 0)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.openasr.idear.actions
package org.openasr.idiolect.actions

import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.psi.*
import org.openasr.idear.ide.IdeService
import org.openasr.idear.psi.PsiUtil.findElementUnderCaret
import org.openasr.idear.tts.TtsService
import org.openasr.idiolect.ide.IdeService
import org.openasr.idiolect.psi.PsiUtil.findElementUnderCaret
import org.openasr.idiolect.tts.TtsService

object WhereAmIAction : IdearAction() {
object WhereAmIAction : IdiolectAction() {
override fun actionPerformed(e: AnActionEvent) {
IdeService.getEditor(e.dataContext)?.findElementUnderCaret()?.let {
TtsService.say("You are in " + it.firstNamedParent())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.openasr.idear.actions.recognition
package org.openasr.idiolect.actions.recognition

import com.intellij.openapi.actionSystem.AnActionEvent

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.openasr.idear.actions.recognition
package org.openasr.idiolect.actions.recognition

import com.intellij.openapi.actionSystem.DataContext
import org.openasr.idear.nlp.NlpGrammar
import org.openasr.idear.nlp.NlpRequest
import org.openasr.idear.nlp.NlpResponse
import org.openasr.idiolect.nlp.NlpGrammar
import org.openasr.idiolect.nlp.NlpRequest
import org.openasr.idiolect.nlp.NlpResponse
import java.awt.Component

abstract class ActionRecognizer(open val displayName: String, open val order: Int = Int.MAX_VALUE / 2) {
Expand Down
Loading

0 comments on commit d5952a9

Please sign in to comment.