Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
rename method and wording of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed Apr 29, 2014
1 parent d2b5000 commit bb7d74b
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Expand Up @@ -236,7 +236,7 @@ public void onKeyShortcut(KeyShortcutEvent event) {
.setHandler(new KeyShortcutEventHandler() {
@Override
public void onKeyShortcut(KeyShortcutEvent event) {
targetContentsPresenter.switchEditor();
targetContentsPresenter.toggleSyntaxHighlighting();
}
}).build();
keyShortcutPresenter.register(switchEditorShortcut);
Expand Down
Expand Up @@ -713,9 +713,9 @@ protected void setStatesForTesting(TransUnitId currentTransUnitId,
}
}

public void switchEditor() {
public void toggleSyntaxHighlighting() {
if (hasSelectedRow()) {
getCurrentDisplay().switchEditor();
getCurrentDisplay().toggleSyntaxHighlighting();
}
}
}
Expand Up @@ -141,6 +141,6 @@ String validationNotificationHeading(@PluralCount int warningCount,
@DefaultMessage("Error message")
String errorMessage();

@DefaultMessage("Switch between syntax highlighting editor and plain text")
@DefaultMessage("Turn syntax highlighting on or off. Spellcheck will not work when syntax highlighting is active.")
String switchBetweenEditor();
}
Expand Up @@ -528,7 +528,7 @@ String undoUnsuccessful(@PluralCount int unsuccessfulCount,
@DefaultMessage("'Enter' key saves immediately")
String enterKeySaves();

@DefaultMessage("Use syntax highlighting Editor (Warning: no spell check, long lines may have some wrapping issue)")
@DefaultMessage("Use syntax highlighting Editor (Warning: no spell check, long lines may have some wrapping issues)")
String useSyntaxHighlight();

@DefaultMessage("Show 'Save as Approved' warning")
Expand Down
Expand Up @@ -246,7 +246,7 @@ public TransUnitId getId() {
}

@Override
public void switchType() {
public void toggleType() {
String currentText = textArea.getText();
int cursorPos = textArea.getCursorPos();
boolean editing = textArea.isEditing();
Expand Down
Expand Up @@ -29,7 +29,7 @@ public interface ToggleEditor extends IsWidget, HasText,

TransUnitId getId();

void switchType();
void toggleType();

static enum ViewMode {
VIEW, EDIT
Expand Down
Expand Up @@ -74,7 +74,7 @@ void updateCachedTargetsAndVersion(List<String> targets, Integer verNum,

ContentState getCachedState();

void switchEditor();
void toggleSyntaxHighlighting();

interface Listener {
void validate(ToggleEditor editor);
Expand Down
Expand Up @@ -165,9 +165,9 @@ public ContentState getCachedState() {
}

@Override
public void switchEditor() {
public void toggleSyntaxHighlighting() {
for (ToggleEditor editor : editors) {
editor.switchType();
editor.toggleType();
}
}

Expand Down

0 comments on commit bb7d74b

Please sign in to comment.