Skip to content

Commit

Permalink
Add Misc Statusbar Tooltips
Browse files Browse the repository at this point in the history
- added statusbar tooltip for `select language mode`
- added statusbar tooltip for `select encoding`
- added statusbar tooltip for `select indentation`
- added statusbar tooltip for `select end of line sequence`
- added statusbar tooltip for `go to line` (clicking the statusbar item now triggers the `go to line` command)`

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto committed Dec 20, 2019
1 parent 44efdc4 commit cab90e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 7 additions & 3 deletions packages/editor/src/browser/editor-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ export class EditorContribution implements FrontendApplicationContribution, Comm
text: languageName,
alignment: StatusBarAlignment.RIGHT,
priority: 1,
command: EditorCommands.CHANGE_LANGUAGE.id
command: EditorCommands.CHANGE_LANGUAGE.id,
tooltip: 'Select Language Mode'
});
}

Expand All @@ -125,7 +126,8 @@ export class EditorContribution implements FrontendApplicationContribution, Comm
text: SUPPORTED_ENCODINGS[editor.getEncoding()].labelShort,
alignment: StatusBarAlignment.RIGHT,
priority: 10,
command: EditorCommands.CHANGE_ENCODING.id
command: EditorCommands.CHANGE_ENCODING.id,
tooltip: 'Select Encoding'
});
}

Expand All @@ -138,7 +140,9 @@ export class EditorContribution implements FrontendApplicationContribution, Comm
this.statusBar.setElement('editor-status-cursor-position', {
text: `Ln ${cursor.line + 1}, Col ${editor.getVisibleColumn(cursor)}`,
alignment: StatusBarAlignment.RIGHT,
priority: 100
priority: 100,
tooltip: 'Go To Line',
command: 'editor.action.gotoLine'
});
}

Expand Down
6 changes: 4 additions & 2 deletions packages/monaco/src/browser/monaco-status-bar-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export class MonacoStatusBarContribution implements FrontendApplicationContribut
text: `${useSpaceOrTab}: ${tabSize}`,
alignment: StatusBarAlignment.RIGHT,
priority: 10,
command: EditorCommands.CONFIG_INDENTATION.id
command: EditorCommands.CONFIG_INDENTATION.id,
tooltip: 'Select Indentation'
});
}
}
Expand All @@ -89,7 +90,8 @@ export class MonacoStatusBarContribution implements FrontendApplicationContribut
text: `${text}`,
alignment: StatusBarAlignment.RIGHT,
priority: 11,
command: EditorCommands.CONFIG_EOL.id
command: EditorCommands.CONFIG_EOL.id,
tooltip: 'Select End Of Line Sequence'
});
}
}
Expand Down

0 comments on commit cab90e1

Please sign in to comment.