@eclipse-docks/core 0.7.95 → 0.7.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-docks/core",
3
- "version": "0.7.95",
3
+ "version": "0.7.96",
4
4
  "description": "Eclipse Docks platform core: registries, services, parts, widgets, and API",
5
5
  "type": "module",
6
6
  "license": "EPL-2.0",
@@ -3,6 +3,7 @@ import { contributionRegistry, type HTMLContribution } from "../core/contributio
3
3
  import {
4
4
  PANEL_BOTTOM,
5
5
  SIDEBAR_MAIN,
6
+ SIDEBAR_MAIN_TOOLBAR,
6
7
  TOOLBAR_BOTTOM_END,
7
8
  TOOLBAR_MAIN_RIGHT
8
9
  } from "../core/constants";
@@ -55,3 +56,8 @@ contributionRegistry.registerContribution(TOOLBAR_MAIN_RIGHT, {
55
56
  component: () => html`<docks-layout-switcher></docks-layout-switcher>`
56
57
  } as HTMLContribution);
57
58
 
59
+ contributionRegistry.registerContribution(SIDEBAR_MAIN_TOOLBAR, {
60
+ command: "open_extensions",
61
+ icon: "docks extensions",
62
+ label: "Extensions",
63
+ });
@@ -258,7 +258,18 @@ class ExtensionRegistry {
258
258
  /** Like enable() but returns a Promise that resolves when the extension is loaded. Use when the caller must wait for commands/contributions to be registered (e.g. before rendering the app). */
259
259
  public async enableAsync(extensionId: string, informUser: boolean = false): Promise<void> {
260
260
  if (this.isEnabled(extensionId)) {
261
- return
261
+ if (!this.isLoaded(extensionId)) {
262
+ logger.debug(
263
+ `Extension ${extensionId} is enabled in settings but not loaded; loading now`,
264
+ );
265
+ try {
266
+ await this.load(extensionId);
267
+ } catch (e) {
268
+ logger.error(`Could not load extension: ${extensionId}: ${e}`);
269
+ throw e;
270
+ }
271
+ }
272
+ return;
262
273
  }
263
274
  logger.debug(`Loading extension: ${extensionId}`)
264
275
  try {
@@ -135,7 +135,7 @@ export class DocksToolbar extends DocksElement {
135
135
 
136
136
  protected doBeforeUI() {
137
137
  this.refreshContributions();
138
-
138
+
139
139
  subscribe(TOPIC_CONTRIBUTEIONS_CHANGED, (event: ContributionChangeEvent) => {
140
140
  const id = this.getAttribute("id");
141
141
  if (!id) return;