@@ -717,16 +717,69 @@ declare module 'vscode' {
717
717
718
718
//#region file-decorations: https://github.com/microsoft/vscode/issues/54938
719
719
720
+ // TODO@jrieken FileDecoration, FileDecorationProvider etc.
721
+ // TODO@jrieken Add selector notion to limit decorations to a view.
722
+ // TODO@jrieken Rename `Decoration.letter` to `short` so that it could be used for coverage et al.
723
+
720
724
export class Decoration {
725
+
726
+ /**
727
+ * A letter that represents this decoration.
728
+ */
721
729
letter ?: string ;
730
+
731
+ /**
732
+ * The human-readable title for this decoration.
733
+ */
722
734
title ?: string ;
735
+
736
+ /**
737
+ * The color of this decoration.
738
+ */
723
739
color ?: ThemeColor ;
740
+
741
+ /**
742
+ * The priority of this decoration.
743
+ */
724
744
priority ?: number ;
745
+
746
+ /**
747
+ * A flag expressing that this decoration should be
748
+ * propagted to its parents.
749
+ */
725
750
bubble ?: boolean ;
751
+
752
+ /**
753
+ * Creates a new decoration.
754
+ *
755
+ * @param letter A letter that represents the decoration.
756
+ * @param title The title of the decoration.
757
+ * @param color The color of the decoration.
758
+ */
759
+ constructor ( letter ?: string , title ?: string , color ?: ThemeColor ) ;
726
760
}
727
761
762
+ /**
763
+ * The decoration provider interfaces defines the contract between extensions and
764
+ * file decorations.
765
+ */
728
766
export interface DecorationProvider {
767
+
768
+ /**
769
+ * An event to signal decorations for one or many files have changed.
770
+ *
771
+ * @see [EventEmitter](#EventEmitter
772
+ */
729
773
onDidChangeDecorations : Event < undefined | Uri | Uri [ ] > ;
774
+
775
+ /**
776
+ * Provide decorations for a given uri.
777
+ *
778
+ *
779
+ * @param uri The uri of the file to provide a decoration for.
780
+ * @param token A cancellation token.
781
+ * @returns A decoration or a thenable that resolves to such.
782
+ */
730
783
provideDecoration ( uri : Uri , token : CancellationToken ) : ProviderResult < Decoration > ;
731
784
}
732
785
0 commit comments