| Index: dart/site/try/src/decoration.dart
|
| diff --git a/dart/site/try/src/decoration.dart b/dart/site/try/src/decoration.dart
|
| index 87e62b879fa7a1e51a8bfcc964884b7de420c46a..bdf7be22bf6ec5cf20528d0fae54fe41922afce5 100644
|
| --- a/dart/site/try/src/decoration.dart
|
| +++ b/dart/site/try/src/decoration.dart
|
| @@ -99,3 +99,33 @@ warning(text) {
|
| ..style.opacity = '0.75'
|
| ..append(text);
|
| }
|
| +
|
| +class CodeCompletionDecoration extends Decoration {
|
| + const CodeCompletionDecoration(
|
| + {String color: '#000000',
|
| + bool bold: false,
|
| + bool italic: false,
|
| + bool stress: false,
|
| + bool important: false})
|
| + : super(color: color, bold: bold, italic: italic, stress: stress,
|
| + important: important);
|
| +
|
| + static from(Decoration decoration) {
|
| + return new CodeCompletionDecoration(
|
| + color: decoration.color,
|
| + bold: decoration.bold,
|
| + italic: decoration.italic,
|
| + stress: decoration.stress,
|
| + important: decoration.important);
|
| + }
|
| +
|
| + Element applyTo(text) {
|
| + var codeCompletion = new DivElement()
|
| + ..contentEditable = 'false'
|
| + ..classes.add('dart-code-completion')
|
| + ..appendText('Completion goes here');
|
| + return super.applyTo(text)
|
| + ..classes.add('dart-code-completion-holder')
|
| + ..nodes.insert(0, codeCompletion);
|
| + }
|
| +}
|
|
|