Skip to content

Commit

Permalink
Merge recent contributions to 'develop' with a minor version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
Versatilus committed Jan 16, 2018
2 parents ccde413 + 2fc19b5 commit 2eb453a
Show file tree
Hide file tree
Showing 27 changed files with 458 additions and 557 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
70 changes: 30 additions & 40 deletions _caster.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,36 @@ def _wait_for_wsr_activation():

_NEXUS = None

try:
from caster.lib import settings# requires nothing
settings.WSR = __name__ == "__main__"
from caster.lib import utilities# requires settings
if settings.WSR:
_wait_for_wsr_activation()
SymbolSpecs.set_cancel_word("escape")
from caster.lib import control
_NEXUS = control.nexus()

from caster.apps import *
from caster.asynch import *
from caster.lib import context
import caster.lib.dev.dev
from caster.asynch.sikuli import sikuli
from caster.lib import navigation
navigation.initialize_clipboard(_NEXUS)
from caster.lib.dfplus.state.short import R
from caster.lib.dfplus.additions import IntegerRefST

from caster.lib.dfplus.merge.mergepair import MergeInf
from caster.lib.ccr import *
from caster.lib.ccr.recording.again import Again
from caster.lib.ccr.recording.alias import VanillaAlias
from caster.lib.ccr.recording import history
from caster.lib.dev import dev
from caster.lib.dfplus.hint.nodes import css
from caster.user.filters.examples import scen4, modkeysup
from caster import user
from caster.lib.dfplus.merge.mergerule import MergeRule
from caster.lib.dfplus.merge import gfilter

except:
print("\nAttempting to load CCR anyway...")
from caster.lib import utilities
from caster.lib import control
_NEXUS = control.nexus()

utilities.simple_log()

from caster.lib import settings# requires nothing
settings.WSR = __name__ == "__main__"
from caster.lib import utilities# requires settings
if settings.WSR:
_wait_for_wsr_activation()
SymbolSpecs.set_cancel_word("escape")
from caster.lib import control
_NEXUS = control.nexus()

from caster.apps import *
from caster.asynch import *
from caster.lib import context
import caster.lib.dev.dev
from caster.asynch.sikuli import sikuli
from caster.lib import navigation
navigation.initialize_clipboard(_NEXUS)
from caster.lib.dfplus.state.short import R
from caster.lib.dfplus.additions import IntegerRefST

from caster.lib.dfplus.merge.mergepair import MergeInf
from caster.lib.ccr import *
from caster.lib.ccr.recording.again import Again
from caster.lib.ccr.recording.alias import VanillaAlias
from caster.lib.ccr.recording import history
from caster.lib.dev import dev
from caster.lib.dfplus.hint.nodes import css
from caster.user.filters.examples import scen4, modkeysup
from caster import user
from caster.lib.dfplus.merge.mergerule import MergeRule
from caster.lib.dfplus.merge import gfilter



Expand Down
2 changes: 1 addition & 1 deletion caster/apps/eclipse.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class EclipseRule(MergeRule):
class EclipseCCR(MergeRule):
pronunciation = "eclipse jump"

mwith = [Navigation().get_name()]
mwith = [Navigation().get_pronunciation()]

mapping = {
#Line Ops
Expand Down
80 changes: 40 additions & 40 deletions caster/apps/explorer.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
from dragonfly import (Grammar, AppContext, MappingRule,
Dictation, IntegerRef,
Key, Text, Repeat, Pause)

from caster.lib import control
from caster.lib import settings
from caster.lib.dfplus.additions import IntegerRefST
from caster.lib.dfplus.merge import gfilter
from caster.lib.dfplus.merge.mergerule import MergeRule
from caster.lib.dfplus.state.short import R


class IERule(MergeRule):
pronunciation = "explorer"

mapping = {
"address bar": R(Key("a-d"), rdescript="Explorer: Address Bar"),
"new folder": R(Key("cs-n"), rdescript="Explorer: New Folder"),
"new file": R(Key("a-f, w, t"), rdescript="Explorer: New File"),
"(show | file | folder) properties": R(Key("a-enter"), rdescript="Explorer: Properties Dialog"),
}
extras = [
Dictation("text"),
IntegerRefST("n", 1, 1000),

]
defaults = {"n": 1}

#---------------------------------------------------------------------------

context = AppContext(executable="explorer")
grammar = Grammar("Windows Explorer", context=context)

if settings.SETTINGS["apps"]["explorer"]:
if settings.SETTINGS["miscellaneous"]["rdp_mode"]:
control.nexus().merger.add_global_rule(IERule())
else:
rule = IERule(name="explorer")
gfilter.run_on(rule)
grammar.add_rule(rule)
from dragonfly import (Grammar, AppContext, MappingRule,
Dictation, IntegerRef,
Key, Text, Repeat, Pause)

from caster.lib import control
from caster.lib import settings
from caster.lib.dfplus.additions import IntegerRefST
from caster.lib.dfplus.merge import gfilter
from caster.lib.dfplus.merge.mergerule import MergeRule
from caster.lib.dfplus.state.short import R


class IERule(MergeRule):
pronunciation = "explorer"

mapping = {
"address bar": R(Key("a-d"), rdescript="Explorer: Address Bar"),
"new folder": R(Key("cs-n"), rdescript="Explorer: New Folder"),
"new file": R(Key("a-f, w, t"), rdescript="Explorer: New File"),
"(show | file | folder) properties": R(Key("a-enter"), rdescript="Explorer: Properties Dialog"),
}
extras = [
Dictation("text"),
IntegerRefST("n", 1, 1000),

]
defaults = {"n": 1}

#---------------------------------------------------------------------------

context = AppContext(executable="explorer")
grammar = Grammar("Windows Explorer", context=context)

if settings.SETTINGS["apps"]["explorer"]:
if settings.SETTINGS["miscellaneous"]["rdp_mode"]:
control.nexus().merger.add_global_rule(IERule())
else:
rule = IERule(name="explorer")
gfilter.run_on(rule)
grammar.add_rule(rule)
grammar.load()
2 changes: 1 addition & 1 deletion caster/apps/flashdevelop.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class FlashDevelopRule(MergeRule):

class FlashDevelopCCR(MergeRule):
pronunciation = "flash develop test"
mwith = [Navigation().get_name()]
mwith = [Navigation().get_pronunciation()]

mapping = {
"[go to] line <n>": R(Key("c-g") + Pause("50") + Text("%(n)d") + Key("enter"),
Expand Down
74 changes: 37 additions & 37 deletions caster/apps/foxitreader.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
from dragonfly import (Grammar, AppContext, Dictation, Key, Repeat)

from caster.lib import control
from caster.lib import settings
from caster.lib.dfplus.additions import IntegerRefST
from caster.lib.dfplus.merge import gfilter
from caster.lib.dfplus.merge.mergerule import MergeRule
from caster.lib.dfplus.state.short import R


class FoxitRule(MergeRule):
pronunciation = "fox it reader"

mapping = {
"next tab [<n>]": R(Key("c-tab"), rdescript="Foxit Reader: Next Tab") * Repeat(extra="n"),
"prior tab [<n>]": R(Key("cs-tab"), rdescript="Foxit Reader: Previous Tab") * Repeat(extra="n"),
"close tab [<n>]": R(Key("c-f4/20"), rdescript="Foxit Reader: Close Tab") * Repeat(extra="n"),
}
extras = [
Dictation("text"),
Dictation("mim"),
IntegerRefST("n", 1, 1000),
]
defaults = {"n": 1, "mim":""}

#---------------------------------------------------------------------------

context = AppContext(executable="Foxit Reader")
grammar = Grammar("Foxit Reader", context=context)

if settings.SETTINGS["apps"]["foxitreader"]:
if settings.SETTINGS["miscellaneous"]["rdp_mode"]:
control.nexus().merger.add_global_rule(FoxitRule())
else:
rule = FoxitRule(name="Foxit Reader")
gfilter.run_on(rule)
grammar.add_rule(rule)
from dragonfly import (Grammar, AppContext, Dictation, Key, Repeat)

from caster.lib import control
from caster.lib import settings
from caster.lib.dfplus.additions import IntegerRefST
from caster.lib.dfplus.merge import gfilter
from caster.lib.dfplus.merge.mergerule import MergeRule
from caster.lib.dfplus.state.short import R


class FoxitRule(MergeRule):
pronunciation = "fox it reader"

mapping = {
"next tab [<n>]": R(Key("c-tab"), rdescript="Foxit Reader: Next Tab") * Repeat(extra="n"),
"prior tab [<n>]": R(Key("cs-tab"), rdescript="Foxit Reader: Previous Tab") * Repeat(extra="n"),
"close tab [<n>]": R(Key("c-f4/20"), rdescript="Foxit Reader: Close Tab") * Repeat(extra="n"),
}
extras = [
Dictation("text"),
Dictation("mim"),
IntegerRefST("n", 1, 1000),
]
defaults = {"n": 1, "mim":""}

#---------------------------------------------------------------------------

context = AppContext(executable="Foxit Reader")
grammar = Grammar("Foxit Reader", context=context)

if settings.SETTINGS["apps"]["foxitreader"]:
if settings.SETTINGS["miscellaneous"]["rdp_mode"]:
control.nexus().merger.add_global_rule(FoxitRule())
else:
rule = FoxitRule(name="Foxit Reader")
gfilter.run_on(rule)
grammar.add_rule(rule)
grammar.load()
17 changes: 11 additions & 6 deletions caster/apps/visualstudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ class VisualStudioRule(MergeRule):
"next tab [<n>]": R(Key("ca-pgdown"), rdescript="Visual Studio: Next Tab") * Repeat(extra="n"),
"prior tab [<n>]": R(Key("ca-pgup"), rdescript="Visual Studio: Previous Tab") * Repeat(extra="n"),
"close tab [<n>]": R(Key("c-f4/20"), rdescript="Visual Studio: Close Tab") * Repeat(extra="n"),

"(list | show) documents": R(Key("a-w, w"), rdescript="Visual Studio: List Documents"),
"[focus] document (window | pane)": R(Key("a-w, w, enter"), rdescript="Visual Studio: Focus Document Pane"),
"solution explorer": R(Key("ca-l"), rdescript="Visual Studio: Solution Explorer"),
"team explorer": R(Key("c-backslash, c-m"), rdescript="Visual Studio: Team Explorer"),
"source control explorer": R(Key("c-q") + Text("Source Control Explorer") + Key("enter"), rdescript="Visual Studio: Source Control Explorer"),

"quick launch": R(Key("c-q"), rdescript="Visual Studio: Quick Launch"),
"go to line": R(Key("c-g"), rdescript="Visual Studio: Go To Line"),

"comment line": R(Key("c-k, c-c"), rdescript="Visual Studio: Comment Selection"),
"comment block": R(Key("c-k, c-c"), rdescript="Visual Studio: Comment Block"),
"(un | on) comment line": R(Key("c-k/50, c-u"), rdescript="Visual Studio: Uncomment Selection"),
Expand All @@ -36,18 +36,23 @@ class VisualStudioRule(MergeRule):
"collapse to definitions": R(Key("c-m, c-o"), rdescript="Visual Studio: Collapse To Definitions"),
"toggle [section] outlining": R(Key("c-m, c-m"), rdescript="Visual Studio: Toggle Section Outlining"),
"toggle all outlining": R(Key("c-m, c-l"), rdescript="Visual Studio: Toggle All Outlining"),

"[toggle] breakpoint": R(Key("f9"), rdescript="Visual Studio: Breakpoint"),
"step over [<n>]": R(Key("f10/50") * Repeat(extra="n"), rdescript="Visual Studio: Step Over"),
"step into": R(Key("f11"), rdescript="Visual Studio: Step Into"),
"step out [of]": R(Key("s-f11"), rdescript="Visual Studio: Step Out"),
"resume": R(Key("f5"), rdescript="Visual Studio: Resume"),


"run tests": R(Key("c-r, t"), rdescript="Visual Studio: Run test(s)"),
"run all tests": R(Key("c-r, a"), rdescript="Visual Studio: Run all tests"),

"build solution": R(Key("cs-b"), rdescript="Visual Studio: Build solution"),

"get latest [version]": R(Key("a-f, r, l"), rdescript="Visual Studio: Get Latest"),
"(show | view) history": R(Key("a-f, r, h"), rdescript="Visual Studio: Show History"),
"compare (files | versions)": R(Key("a-f, r, h"), rdescript="Visual Studio: Compare..."),
"undo (checkout | pending changes)": R(Key("a-f, r, u"), rdescript="Visual Studio: Undo Pending Changes"),

"[open] [go to] work item": R(Key("a-m, g"), rdescript="Visual Studio: Open Work Item"),
"[add] [new] linked work item": R(Key("sa-l"), rdescript="Visual Studio: New Linked Work Item"),
}
Expand Down
Loading

0 comments on commit 2eb453a

Please sign in to comment.