Package com.google.collide.client.editor.input

Examples of com.google.collide.client.editor.input.TestSignalEvent


    };

    Runnable ctrlBsClicker = new Runnable() {
      @Override
      public void run() {
        TestSignalEvent bsTrigger = new TestSignalEvent(
            KeyCodes.KEY_BACKSPACE, KeySignalType.DELETE, ModifierKeys.ACTION);
        editor.getInput().processSignalEvent(bsTrigger);
      }
    };
View Full Code Here


  public String getModuleName() {
    return "com.google.collide.client.TestCode";
  }

  public void testSplitLine() {
    final TestSignalEvent ctrlEnter = new TestSignalEvent(KeyboardEvent.KeyCode.ENTER,
        SignalEvent.KeySignalType.INPUT, ModifierKeys.ACTION);

    String text = "  color: black;";
    String expected = "  color: \n  black;";
    checkAction(ctrlEnter, text, expected, 0, 9, 0, 9, 0, 9);
View Full Code Here

    String expected = "  color: \n  black;";
    checkAction(ctrlEnter, text, expected, 0, 9, 0, 9, 0, 9);
  }

  public void testSplitLineWithSelection() {
    final TestSignalEvent ctrlEnter = new TestSignalEvent(KeyboardEvent.KeyCode.ENTER,
        SignalEvent.KeySignalType.INPUT, ModifierKeys.ACTION);

    String text = "  color: black;";
    String expected = "  color\n  black;";
    checkAction(ctrlEnter, text, expected, 0, 7, 0, 9, 0, 7);
View Full Code Here

    String expected = "  color\n  black;";
    checkAction(ctrlEnter, text, expected, 0, 7, 0, 9, 0, 7);
  }

  public void testSplitLineWithReverseSelection() {
    final TestSignalEvent ctrlEnter = new TestSignalEvent(KeyboardEvent.KeyCode.ENTER,
        SignalEvent.KeySignalType.INPUT, ModifierKeys.ACTION);

    String text = "  color: black;";
    String expected = "  color\n  black;";
    checkAction(ctrlEnter, text, expected, 0, 9, 0, 7, 0, 7);
View Full Code Here

    String expected = "  color\n  black;";
    checkAction(ctrlEnter, text, expected, 0, 9, 0, 7, 0, 7);
  }

  public void testStartNewLine() {
    final TestSignalEvent shiftEnter = new TestSignalEvent(KeyboardEvent.KeyCode.ENTER,
        SignalEvent.KeySignalType.INPUT, ModifierKeys.SHIFT);

    String text = "  color: black;";
    String expected = "  color: black;\n  ";
    checkAction(shiftEnter, text, expected, 0, 8, 0, 8, 1, 2);
View Full Code Here

    String expected = "  color: black;\n  ";
    checkAction(shiftEnter, text, expected, 0, 8, 0, 8, 1, 2);
  }

  public void testStartNewLineWithSelection() {
    final TestSignalEvent shiftEnter = new TestSignalEvent(KeyboardEvent.KeyCode.ENTER,
        SignalEvent.KeySignalType.INPUT, ModifierKeys.SHIFT);

    String text = "  color: black;";
    String expected = "  color: black;\n  ";
    checkAction(shiftEnter, text, expected, 0, 0, 0, 8, 1, 2);
View Full Code Here

      public void scheduleDeferred(ScheduledCommand scheduledCommand) {
        scheduled.add(scheduledCommand);
      }
    };

    final TestSignalEvent ctrlSlashTriger = new TestSignalEvent(
        KeyboardEvent.KeyCode.SLASH, SignalEvent.KeySignalType.INPUT,
        ModifierKeys.ACTION);

    Runnable ctrlShiftSlashClicker = new Runnable() {
      @Override
View Full Code Here

TOP

Related Classes of com.google.collide.client.editor.input.TestSignalEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.