@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/dist/api/index.js +2 -2
- package/dist/{api-BtDjEaYP.js → api-BCLny6A5.js} +7 -2
- package/dist/api-BCLny6A5.js.map +1 -0
- package/dist/core/extensionregistry.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/parts/index.js +1 -1
- package/dist/{parts-BUQx-7Vd.js → parts-Bl4MkOUi.js} +13 -2
- package/dist/parts-Bl4MkOUi.js.map +1 -0
- package/package.json +1 -1
- package/src/contributions/default-ui-contributions.ts +6 -0
- package/src/core/extensionregistry.ts +12 -1
- package/src/parts/toolbar.ts +1 -1
- package/dist/api-BtDjEaYP.js.map +0 -1
- package/dist/parts-BUQx-7Vd.js.map +0 -1
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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 {
|
package/src/parts/toolbar.ts
CHANGED
|
@@ -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;
|