Skip to content

Commit

Permalink
Fix Initialization Order (#133)
Browse files Browse the repository at this point in the history
* Fix initialization order

* prettier
  • Loading branch information
chrstinalin authored Oct 17, 2024
1 parent 4188c36 commit 54d6a0a
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ export async function activate(context: vscode.ExtensionContext) {
const credentialController = new CredentialController(context.secrets);
const directoryController = new DirectoryController();

const fileDecorationProvider = new CustomFileDecorationProvider();
const fileDecoratorController = new FileDecoratorController(
fileDecorationProvider
);

const commentsCache = new AssayCache("comments", storagePath);
const commentCacheController = new CommentCacheController(
commentsCache,
directoryController,
fileDecoratorController
);
const commentController = new CommentController(
"assay-comments",
"Assay",
commentCacheController,
directoryController
);

const rootFolderPath = await directoryController.getRootFolderPath();
const sidebarController = new SidebarController(
"assayCommands",
Expand Down Expand Up @@ -169,28 +187,11 @@ export async function activate(context: vscode.ExtensionContext) {
true
);

const commentsCache = new AssayCache("comments", storagePath);

// Review Controllers
const fileDecorationProvider = new CustomFileDecorationProvider();
const fileDecoratorController = new FileDecoratorController(
fileDecorationProvider
);
const commentCacheController = new CommentCacheController(
commentsCache,
directoryController,
fileDecoratorController
);
fileDecorationProvider.setProvideDecorationClause(
commentCacheController.fileHasComment
);

const commentController = new CommentController(
"assay-comments",
"Assay",
commentCacheController,
directoryController
);
const statusBarController = new StatusBarController(
addonCacheController,
directoryController
Expand Down

0 comments on commit 54d6a0a

Please sign in to comment.