diff options
Diffstat (limited to 'src/content/operators/impls')
-rw-r--r-- | src/content/operators/impls/FindNextOperator.ts | 15 | ||||
-rw-r--r-- | src/content/operators/impls/FindOperatorFactoryChain.ts | 25 | ||||
-rw-r--r-- | src/content/operators/impls/FindPrevOperator.ts | 15 | ||||
-rw-r--r-- | src/content/operators/impls/OperatorFactoryImpl.ts | 3 |
4 files changed, 0 insertions, 58 deletions
diff --git a/src/content/operators/impls/FindNextOperator.ts b/src/content/operators/impls/FindNextOperator.ts deleted file mode 100644 index c67f6d9..0000000 --- a/src/content/operators/impls/FindNextOperator.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Operator from "../Operator"; -import FindMasterClient from "../../client/FindMasterClient"; - -export default class FindNextOperator implements Operator { - constructor( - private readonly findMasterClient: FindMasterClient, - private readonly repeat: number - ) {} - - async run(): Promise<void> { - for (let i = 0; i < this.repeat; ++i) { - this.findMasterClient.findNext(); - } - } -} diff --git a/src/content/operators/impls/FindOperatorFactoryChain.ts b/src/content/operators/impls/FindOperatorFactoryChain.ts deleted file mode 100644 index b3524c1..0000000 --- a/src/content/operators/impls/FindOperatorFactoryChain.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { inject, injectable } from "tsyringe"; -import Operator from "../Operator"; -import OperatorFactoryChain from "../OperatorFactoryChain"; -import FindNextOperator from "./FindNextOperator"; -import FindPrevOperator from "./FindPrevOperator"; -import FindMasterClient from "../../client/FindMasterClient"; -import * as operations from "../../../shared/operations"; - -@injectable() -export default class FindOperatorFactoryChain implements OperatorFactoryChain { - constructor( - @inject("FindMasterClient") - private readonly findMasterClient: FindMasterClient - ) {} - - create(op: operations.Operation, repeat: number): Operator | null { - switch (op.type) { - case operations.FIND_NEXT: - return new FindNextOperator(this.findMasterClient, repeat); - case operations.FIND_PREV: - return new FindPrevOperator(this.findMasterClient, repeat); - } - return null; - } -} diff --git a/src/content/operators/impls/FindPrevOperator.ts b/src/content/operators/impls/FindPrevOperator.ts deleted file mode 100644 index f73e605..0000000 --- a/src/content/operators/impls/FindPrevOperator.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Operator from "../Operator"; -import FindMasterClient from "../../client/FindMasterClient"; - -export default class FindPrevOperator implements Operator { - constructor( - private readonly findMasterClient: FindMasterClient, - private readonly repeat: number - ) {} - - async run(): Promise<void> { - for (let i = 0; i < this.repeat; ++i) { - this.findMasterClient.findPrev(); - } - } -} diff --git a/src/content/operators/impls/OperatorFactoryImpl.ts b/src/content/operators/impls/OperatorFactoryImpl.ts index 22b35c8..bc9bbee 100644 --- a/src/content/operators/impls/OperatorFactoryImpl.ts +++ b/src/content/operators/impls/OperatorFactoryImpl.ts @@ -7,7 +7,6 @@ import { Operation } from "../../../shared/operations"; import OperationClient from "../../client/OperationClient"; import AddonOperatorFactoryChain from "./AddonOperatorFactoryChain"; import ClipboardOperatorFactoryChain from "./ClipboardOperatorFactoryChain"; -import FindOperatorFactoryChain from "./FindOperatorFactoryChain"; import FocusOperatorFactoryChain from "./FocusOperatorFactoryChain"; import FollowOperatorFactoryChain from "./FollowOperatorFactoryChain"; import MarkOperatorFactoryChain from "./MarkOperatorFactoryChain"; @@ -20,7 +19,6 @@ export default class OperatorFactoryImpl implements OperatorFactory { constructor( addonOperatorFactoryChain: AddonOperatorFactoryChain, clipboardOperatorFactoryChain: ClipboardOperatorFactoryChain, - findOperatorFactoryChain: FindOperatorFactoryChain, focusOperatorFactoryChain: FocusOperatorFactoryChain, followOperatorFactoryChain: FollowOperatorFactoryChain, markOperatorFactoryChain: MarkOperatorFactoryChain, @@ -31,7 +29,6 @@ export default class OperatorFactoryImpl implements OperatorFactory { this.factoryChains = [ addonOperatorFactoryChain, clipboardOperatorFactoryChain, - findOperatorFactoryChain, focusOperatorFactoryChain, followOperatorFactoryChain, markOperatorFactoryChain, |