@theia/markers 1.70.0-next.21 → 1.70.0-next.26
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/lib/browser/problem/problem-auto-save-contribution.d.ts +12 -0
- package/lib/browser/problem/problem-auto-save-contribution.d.ts.map +1 -0
- package/lib/browser/problem/problem-auto-save-contribution.js +55 -0
- package/lib/browser/problem/problem-auto-save-contribution.js.map +1 -0
- package/lib/browser/problem/problem-frontend-module.d.ts.map +1 -1
- package/lib/browser/problem/problem-frontend-module.js +4 -0
- package/lib/browser/problem/problem-frontend-module.js.map +1 -1
- package/package.json +5 -5
- package/src/browser/problem/problem-auto-save-contribution.ts +47 -0
- package/src/browser/problem/problem-frontend-module.ts +5 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Emitter, Event } from '@theia/core';
|
|
2
|
+
import { SaveErrorChecker } from '@theia/core/lib/browser/saveable-service';
|
|
3
|
+
import { ProblemManager } from './problem-manager';
|
|
4
|
+
import URI from '@theia/core/lib/common/uri';
|
|
5
|
+
export declare class ProblemAutoSaveContribution implements SaveErrorChecker {
|
|
6
|
+
protected readonly problemManager: ProblemManager;
|
|
7
|
+
protected readonly onDidErrorStateChangeEmitter: Emitter<void>;
|
|
8
|
+
get onDidErrorStateChange(): Event<void>;
|
|
9
|
+
protected init(): void;
|
|
10
|
+
hasErrors(uri: URI): boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=problem-auto-save-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"problem-auto-save-contribution.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-auto-save-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,qBACa,2BAA4B,YAAW,gBAAgB;IAGhE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAElD,SAAS,CAAC,QAAQ,CAAC,4BAA4B,gBAAuB;IAEtE,IAAI,qBAAqB,IAAI,KAAK,CAAC,IAAI,CAAC,CAEvC;IAGD,SAAS,CAAC,IAAI,IAAI,IAAI;IAMtB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;CAI/B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 Safi Seid-Ahmad, K2view.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ProblemAutoSaveContribution = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const core_1 = require("@theia/core");
|
|
22
|
+
const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
|
|
23
|
+
const problem_manager_1 = require("./problem-manager");
|
|
24
|
+
let ProblemAutoSaveContribution = class ProblemAutoSaveContribution {
|
|
25
|
+
constructor() {
|
|
26
|
+
this.onDidErrorStateChangeEmitter = new core_1.Emitter();
|
|
27
|
+
}
|
|
28
|
+
get onDidErrorStateChange() {
|
|
29
|
+
return this.onDidErrorStateChangeEmitter.event;
|
|
30
|
+
}
|
|
31
|
+
init() {
|
|
32
|
+
this.problemManager.onDidChangeMarkers(() => {
|
|
33
|
+
this.onDidErrorStateChangeEmitter.fire();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
hasErrors(uri) {
|
|
37
|
+
const markers = this.problemManager.findMarkers({ uri });
|
|
38
|
+
return markers.some(marker => marker.data.severity === vscode_languageserver_protocol_1.DiagnosticSeverity.Error);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.ProblemAutoSaveContribution = ProblemAutoSaveContribution;
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, inversify_1.inject)(problem_manager_1.ProblemManager),
|
|
44
|
+
tslib_1.__metadata("design:type", problem_manager_1.ProblemManager)
|
|
45
|
+
], ProblemAutoSaveContribution.prototype, "problemManager", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, inversify_1.postConstruct)(),
|
|
48
|
+
tslib_1.__metadata("design:type", Function),
|
|
49
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
50
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
51
|
+
], ProblemAutoSaveContribution.prototype, "init", null);
|
|
52
|
+
exports.ProblemAutoSaveContribution = ProblemAutoSaveContribution = tslib_1.__decorate([
|
|
53
|
+
(0, inversify_1.injectable)()
|
|
54
|
+
], ProblemAutoSaveContribution);
|
|
55
|
+
//# sourceMappingURL=problem-auto-save-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"problem-auto-save-contribution.js","sourceRoot":"","sources":["../../../src/browser/problem/problem-auto-save-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,8CAA8C;AAC9C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAiF;AACjF,sCAA6C;AAE7C,sGAAuF;AACvF,uDAAmD;AAI5C,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAAjC;QAKgB,iCAA4B,GAAG,IAAI,cAAO,EAAQ,CAAC;IAiB1E,CAAC;IAfG,IAAI,qBAAqB;QACrB,OAAO,IAAI,CAAC,4BAA4B,CAAC,KAAK,CAAC;IACnD,CAAC;IAGS,IAAI;QACV,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,EAAE;YACxC,IAAI,CAAC,4BAA4B,CAAC,IAAI,EAAE,CAAC;QAC7C,CAAC,CAAC,CAAC;IACP,CAAC;IAED,SAAS,CAAC,GAAQ;QACd,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QACzD,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,KAAK,mDAAkB,CAAC,KAAK,CAAC,CAAC;IACrF,CAAC;CACJ,CAAA;AAtBY,kEAA2B;AAGjB;IADlB,IAAA,kBAAM,EAAC,gCAAc,CAAC;sCACY,gCAAc;mEAAC;AASxC;IADT,IAAA,yBAAa,GAAE;;;;uDAKf;sCAhBQ,2BAA2B;IADvC,IAAA,sBAAU,GAAE;GACA,2BAA2B,CAsBvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"problem-frontend-module.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,sCAAsC,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;
|
|
1
|
+
{"version":3,"file":"problem-frontend-module.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,sCAAsC,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAkB/D,wBAgCG"}
|
|
@@ -21,6 +21,7 @@ const problem_widget_1 = require("./problem-widget");
|
|
|
21
21
|
const problem_contribution_1 = require("./problem-contribution");
|
|
22
22
|
const problem_container_1 = require("./problem-container");
|
|
23
23
|
const browser_1 = require("@theia/core/lib/browser");
|
|
24
|
+
const saveable_service_1 = require("@theia/core/lib/browser/saveable-service");
|
|
24
25
|
const problem_manager_1 = require("./problem-manager");
|
|
25
26
|
const widget_manager_1 = require("@theia/core/lib/browser/widget-manager");
|
|
26
27
|
const problem_tabbar_decorator_1 = require("./problem-tabbar-decorator");
|
|
@@ -30,6 +31,7 @@ const tab_bar_decorator_1 = require("@theia/core/lib/browser/shell/tab-bar-decor
|
|
|
30
31
|
const marker_tree_label_provider_1 = require("../marker-tree-label-provider");
|
|
31
32
|
const problem_widget_tab_bar_decorator_1 = require("./problem-widget-tab-bar-decorator");
|
|
32
33
|
const problem_decorations_provider_1 = require("./problem-decorations-provider");
|
|
34
|
+
const problem_auto_save_contribution_1 = require("./problem-auto-save-contribution");
|
|
33
35
|
const problem_preferences_1 = require("../../common/problem-preferences");
|
|
34
36
|
exports.default = new inversify_1.ContainerModule(bind => {
|
|
35
37
|
(0, problem_preferences_1.bindProblemPreferences)(bind);
|
|
@@ -52,5 +54,7 @@ exports.default = new inversify_1.ContainerModule(bind => {
|
|
|
52
54
|
bind(browser_1.LabelProviderContribution).toService(marker_tree_label_provider_1.MarkerTreeLabelProvider);
|
|
53
55
|
bind(problem_widget_tab_bar_decorator_1.ProblemWidgetTabBarDecorator).toSelf().inSingletonScope();
|
|
54
56
|
bind(tab_bar_decorator_1.TabBarDecorator).toService(problem_widget_tab_bar_decorator_1.ProblemWidgetTabBarDecorator);
|
|
57
|
+
bind(problem_auto_save_contribution_1.ProblemAutoSaveContribution).toSelf().inSingletonScope();
|
|
58
|
+
bind(saveable_service_1.SaveErrorChecker).toService(problem_auto_save_contribution_1.ProblemAutoSaveContribution);
|
|
55
59
|
});
|
|
56
60
|
//# sourceMappingURL=problem-frontend-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"problem-frontend-module.js","sourceRoot":"","sources":["../../../src/browser/problem/problem-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,gDAA8C;AAE9C,4DAA+D;AAC/D,qDAAqE;AACrE,iEAA6D;AAC7D,2DAA0D;AAC1D,qDAA4J;AAC5J,uDAAmD;AACnD,2EAAuE;AACvE,yEAAoE;AACpE,mFAA0F;AAC1F,2EAA6E;AAC7E,uFAAkF;AAClF,8EAAwE;AACxE,yFAAkF;AAClF,iFAA2G;AAC3G,0EAA0E;AAE1E,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAA,4CAAsB,EAAC,IAAI,CAAC,CAAC;IAE7B,IAAI,CAAC,gCAAc,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEjD,IAAI,CAAC,8BAAa,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACrC,IAAA,uCAAmB,EAAC,GAAG,CAAC,SAAS,CAAC,CACrC,CAAC;IACF,IAAI,CAAC,8BAAa,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3C,EAAE,EAAE,mCAAkB;QACtB,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAA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AAC,yDAA0B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC7D,IAAI,CAAC,iDAAsB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACzD,IAAI,CAAC,mCAAe,CAAC,CAAC,SAAS,CAAC,iDAAsB,CAAC,CAAC;IACxD,IAAI,CAAC,4DAA6B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAChE,IAAI,CAAC,yCAA+B,CAAC,CAAC,SAAS,CAAC,4DAA6B,CAAC,CAAC;IAE/E,IAAI,CAAC,oDAAuB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC1D,IAAI,CAAC,mCAAyB,CAAC,CAAC,SAAS,CAAC,oDAAuB,CAAC,CAAC;IAEnE,IAAI,CAAC,+DAA4B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC/D,IAAI,CAAC,mCAAe,CAAC,CAAC,SAAS,CAAC,+DAA4B,CAAC,CAAC;IAE9D,IAAI,CAAC,4DAA2B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC9D,IAAI,CAAC,mCAAgB,CAAC,CAAC,SAAS,CAAC,4DAA2B,CAAC,CAAC;AAClE,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/markers",
|
|
3
|
-
"version": "1.70.0-next.
|
|
3
|
+
"version": "1.70.0-next.26+b40555ef6",
|
|
4
4
|
"description": "Theia - Markers Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.70.0-next.
|
|
7
|
-
"@theia/filesystem": "1.70.0-next.
|
|
8
|
-
"@theia/workspace": "1.70.0-next.
|
|
6
|
+
"@theia/core": "1.70.0-next.26+b40555ef6",
|
|
7
|
+
"@theia/filesystem": "1.70.0-next.26+b40555ef6",
|
|
8
|
+
"@theia/workspace": "1.70.0-next.26+b40555ef6",
|
|
9
9
|
"tslib": "^2.6.2"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"nyc": {
|
|
48
48
|
"extends": "../../configs/nyc.json"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "b40555ef601736234983a8381eb2da6504994aaa"
|
|
51
51
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 Safi Seid-Ahmad, K2view.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
18
|
+
import { Emitter, Event } from '@theia/core';
|
|
19
|
+
import { SaveErrorChecker } from '@theia/core/lib/browser/saveable-service';
|
|
20
|
+
import { DiagnosticSeverity } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
21
|
+
import { ProblemManager } from './problem-manager';
|
|
22
|
+
import URI from '@theia/core/lib/common/uri';
|
|
23
|
+
|
|
24
|
+
@injectable()
|
|
25
|
+
export class ProblemAutoSaveContribution implements SaveErrorChecker {
|
|
26
|
+
|
|
27
|
+
@inject(ProblemManager)
|
|
28
|
+
protected readonly problemManager: ProblemManager;
|
|
29
|
+
|
|
30
|
+
protected readonly onDidErrorStateChangeEmitter = new Emitter<void>();
|
|
31
|
+
|
|
32
|
+
get onDidErrorStateChange(): Event<void> {
|
|
33
|
+
return this.onDidErrorStateChangeEmitter.event;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@postConstruct()
|
|
37
|
+
protected init(): void {
|
|
38
|
+
this.problemManager.onDidChangeMarkers(() => {
|
|
39
|
+
this.onDidErrorStateChangeEmitter.fire();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
hasErrors(uri: URI): boolean {
|
|
44
|
+
const markers = this.problemManager.findMarkers({ uri });
|
|
45
|
+
return markers.some(marker => marker.data.severity === DiagnosticSeverity.Error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -21,6 +21,7 @@ import { ProblemWidget, PROBLEMS_WIDGET_ID } from './problem-widget';
|
|
|
21
21
|
import { ProblemContribution } from './problem-contribution';
|
|
22
22
|
import { createProblemWidget } from './problem-container';
|
|
23
23
|
import { FrontendApplicationContribution, bindViewContribution, ApplicationShellLayoutMigration, LabelProviderContribution } from '@theia/core/lib/browser';
|
|
24
|
+
import { SaveErrorChecker } from '@theia/core/lib/browser/saveable-service';
|
|
24
25
|
import { ProblemManager } from './problem-manager';
|
|
25
26
|
import { WidgetFactory } from '@theia/core/lib/browser/widget-manager';
|
|
26
27
|
import { ProblemTabBarDecorator } from './problem-tabbar-decorator';
|
|
@@ -30,6 +31,7 @@ import { TabBarDecorator } from '@theia/core/lib/browser/shell/tab-bar-decorator
|
|
|
30
31
|
import { MarkerTreeLabelProvider } from '../marker-tree-label-provider';
|
|
31
32
|
import { ProblemWidgetTabBarDecorator } from './problem-widget-tab-bar-decorator';
|
|
32
33
|
import { ProblemDecorationContribution, ProblemDecorationsProvider } from './problem-decorations-provider';
|
|
34
|
+
import { ProblemAutoSaveContribution } from './problem-auto-save-contribution';
|
|
33
35
|
import { bindProblemPreferences } from '../../common/problem-preferences';
|
|
34
36
|
|
|
35
37
|
export default new ContainerModule(bind => {
|
|
@@ -61,4 +63,7 @@ export default new ContainerModule(bind => {
|
|
|
61
63
|
|
|
62
64
|
bind(ProblemWidgetTabBarDecorator).toSelf().inSingletonScope();
|
|
63
65
|
bind(TabBarDecorator).toService(ProblemWidgetTabBarDecorator);
|
|
66
|
+
|
|
67
|
+
bind(ProblemAutoSaveContribution).toSelf().inSingletonScope();
|
|
68
|
+
bind(SaveErrorChecker).toService(ProblemAutoSaveContribution);
|
|
64
69
|
});
|