-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.d.ts
847 lines (746 loc) · 27.5 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
/*
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/
/*
* This file currently produces some build issues because Typescript has poorly conceived handling of
* .d.ts dependencies. We can clean this up later using the workaround in:
*
* https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232
*/
declare namespace ZLUX {
interface Dispatcher {
/**
* This is the interface that is called by the window manager or app manager to tell the
* dispatcher about an application (i.e. plugin instance).
*/
registerPluginWatcher(plugin:ZLUX.Plugin, watcher: PluginWatcher): void;
//only removes watcher when same exact object
deregisterPluginWatcher(plugin:ZLUX.Plugin, watcher: PluginWatcher): boolean;
registerPluginInstance(plugin: Plugin, applicationInstanceId: any, isIframe: boolean, isEmbedded?:boolean): void;
deregisterPluginInstance(plugin: Plugin, applicationInstanceId: any): void;
setLaunchHandler(launchCallback: any): void;
setPostMessageHandler(postMessageCallback: any): void;
/**
* @deprecated Use getActions instead
* @see getActions
* @param applicationContext
*/
getRecognizers(applicationContext: any): RecognitionRule[];
/**
* @deprecated Use addRecognizerObject instead
* @see addRecognizerObject
* @param predicateObject
* @param actionID
* @param capabilities
*/
addRecognizerFromObject(predicateObject:RecognitionObjectPropClause | RecognitionObjectOpClause, actionID:string, capabilities?: string[]):void;
addRecognizerObject(recoginzerObject: ZLUX.RecognizerObject): void;
addRecognizer(predicate: RecognitionClause, actionID: string): void;
registerAction(action: Action): void;
getAction(recognizer: any): Action | undefined;
registerAbstractAction(action: AbstractAction): void;
getAbstractActionById(actionId: string): AbstractAction | undefined;
getAbstractActions(capabilities: string[], applicationContext: any): ActionLookupResult;
addPendingIframe(plugin:ZLUX.Plugin, launchMetadata: any): void;
callInstance(eventName: string, appInstanceId:string, data: Object): Promise<any>;
callAny(eventName: string, pluginId:string, data: Object): Promise<any>;
callAll(eventName: string, pluginId:string, data: Object, failOnError: boolean): Promise<any>;
callEveryone(eventName: string, data: Object, failOnError: boolean): Promise<any>;
registerEventListener(eventName: string, callback: EventListenerOrEventListenerObject | null, appId: string): void;
deregisterEventListener(eventName: string, callback: EventListenerOrEventListenerObject | null, appId: string, pluginId:string): void;
invokeAction(action: Action, eventContext: any, targetId?: number): Promise<void>;
makeAction(id: string, defaultName: string, targetMode: ActionTargetMode, type: ActionType, targetPluginID: string, primaryArgument: any): Action;
makeActionFromObject(action: AbstractAction): AbstractAction;
registerApplicationCallbacks(plugin: Plugin, applicationInstanceId: any, callbacks: ApplicationCallbacks): void;
clear(): void;
iframeLoaded(instanceId: MVDHosting.InstanceId, identifier: string);
attachWindowManager(windowManager: any);
constants: DispatcherConstants;
}
type RecognizerObject = {
id: string,
capabilities?: string[],
clause: RecognitionObjectPropClause | RecognitionObjectOpClause
}
type RecognitionObjectOpClause = {
op:string,
args: Array<RecognitionObjectPropClause | RecognitionObjectOpClause>
}
type RecognitionObjectPropClause = {
prop: string[]
}
interface RecognitionRule {
}
interface RecognitionClause {
}
type ApplicationOnMessage = (eventContext: any) => Promise<any>;
type ApplicationCallbacks = {
onMessage?: ApplicationOnMessage
}
enum ActionTargetMode {
PluginCreate = 0,
PluginFindUniqueOrCreate = 1,
PluginFindAnyOrCreate = 2,
System = 3,
}
enum ActionType {
Launch = 0,
Focus = 1,
Route = 2,
Message = 3,
Method = 4,
Minimize = 5,
Maximize = 6,
Close = 7,
CreateChannel = 8
}
type DispatcherConstants = {
ActionTargetMode: any,
ActionType: any
}
interface AbstractAction {
/**
* null implies "Action" for backwards-compatibility
*/
objectType?: ActionObjectType;
id: string;
defaultName: string;
getId(): string;
getDefaultName(): string;
}
enum ActionObjectType {
Action, ActionContainer
}
interface Action extends AbstractAction {
targetPluginID: string;
type: ActionType;
targetMode: ActionTargetMode;
}
interface ActionReference {
targetActionId: string;
}
interface ActionContainer extends AbstractAction {
children: (AbstractAction | ActionReference)[];
getChildren(): (AbstractAction | ActionReference)[];
}
interface ActionLookupResult {
actions?: AbstractAction[];
unresolvedActionIds?: string[];
}
interface DispatchMetaData {
originatingActionId: string;
originaltingAppInstanceId: string;
applicationContext: any;
}
interface AgentAPIMLConfig {
serviceName: string;
serviceVersion?: string;
enabled: boolean;
}
interface AgentConfig {
mediationLayer?: AgentAPIMLConfig;
}
interface Environment {
//should cache
get(key:string): Promise<string|undefined>;
getComponents(): Promise<string[]|undefined>;
getExternalComponents(): Promise<string[]|undefined>;
getGatewayPort(): Promise<number|undefined>;
getGatewayHost(): Promise<string|undefined>;
getPlatform(): Promise<string>;
getAgentConfig(): Promise<AgentConfig|undefined>;
getArch(): Promise<string>;
//should poll server
getTime(): Promise<Date>;
}
interface ComponentLogger {
log(minimumLevel: number, ...loggableItems:any[]): void;
info(...loggableItems:any[]): void;
warn(...loggableItems:any[]): void;
severe(...loggableItems:any[]): void;
debug(...loggableItems:any[]): void;
makeSublogger(componentNameSuffix: string): ComponentLogger;
}
interface Logger {
makeComponentLogger(componentName: string, messages?: any): ComponentLogger;
setLogLevelForComponentName(componentName: string, level: number): void;
}
interface Globalization {
getLanguage(): string;
getLocale(): string;
setLanguage(language: string): any;
setLocale(locale: string): any;
}
type UnixFileUriOptions = {
sourceEncoding?: string;
targetEncoding?: string;
newName?: string;
forceOverwrite?: boolean;
sessionID?: number;
lastChunk?: boolean;
responseType?: string;
mode?: string;
recursive?: boolean;
user?: string;
group?: string;
type?: TagType;
codeset?: number;
}
type TagType = 'binary' | 'delete' | 'mixed' | 'text';
/**
An interface which allows an App easy access to URIs specific to its own namespace
@interface
*/
interface UriBroker {
desktopRootUri(): string;
datasetMetadataHlqUri(updateCache?: boolean, types?: string, workAreaSize?: number, resumeName?: string, resumeCatalogName?: string): string;
datasetMetadataUri(dsn: string, detail?: string, types?: string, listMembers?: boolean, workAreaSize?: number, includeMigrated?: boolean, includeUnprintable?: boolean, resumeName?: string, resumeCatalogName?: string, addQualifiers?: string): string;
datasetContentsUri(dsn: string): string;
datasetCopyUri(dsn: string, newDataset: string): string;
VSAMdatasetContentsUri(dsn: string, closeAfter?: boolean): string;
/*TODO: for breaking change, we need to change this into a passed object so that its way cleaner and
more clear as to what is going on
*/
unixFileUri(route: string, absPath: string,
sourceEncodingOrOptions?: string | UnixFileUriOptions | undefined,
targetEncoding?: string | undefined, newName?: string | undefined,
forceOverwrite?: boolean | undefined, sessionID?: number | undefined,
lastChunk?: boolean | undefined, responseType?: string, mode?: string,
recursive?: boolean, user?: string, group?: string,
type?: TagType, codeset?: number
): string;
omvsSegmentUri(): string;
rasUri(uri: string): string;
agentRootUri(uri: string): string;
serverRootUri(uri: string): string;
pluginResourceUri(pluginDefinition: Plugin, relativePath: string): string;
pluginIframeUri(pluginDefinition: Plugin, relativePath: string): string;
pluginListUri(pluginType?: PluginType, update?:boolean): string;
pluginConfigForScopeUri(pluginDefinition: ZLUX.Plugin, scope: string, resourcePath: string, resourceName?: string): string;
/**
Returns a URI for accessing a resource for a particular user. NOTE: This command should be gated by authorization that restricts it to administrative use.
Temporarily removed until authorization checks are in place
@function
*/
//pluginConfigForUserUri(pluginDefinition: ZLUX.Plugin, user: string, resourcePath: string, resourceName?: string): string;
/**
Returns a URI for accessing a resource for a particular group. NOTE: This command should be gated by authorization that restricts it to administrative use.
Temporarily removed until authorization checks are in place
@function
*/
//pluginConfigForGroupUri(pluginDefinition: ZLUX.Plugin, group: string, resourcePath: string, resourceName?: string): string;
pluginConfigUri(pluginDefinition: ZLUX.Plugin, resourcePath: string, resourceName?: string): string;
pluginWSUri(pluginDefinition: Plugin, serviceName: string,
relativePath: string, version?: string): string;
pluginRESTUri(pluginDefinition: Plugin, serviceName: string,
relativePath: string, version?: string): string;
userInfoUri(): string;
}
interface PluginWatcher {
instanceAdded(instanceId: MVDHosting.InstanceId, isEmbedded: boolean|undefined): void;
instanceRemoved(instanceId: MVDHosting.InstanceId): void;
}
const enum PluginType {
Desktop = "desktop",
Application = "application",
Bootstrap = "bootstrap",
NodeAuthentication = "nodeAuthentication",
Library = "library"
}
interface Plugin {
getKey():string;
getIdentifier():string;
getVersion():string;
getWebContent():any;
getType():PluginType;
getCopyright(): string;
hasComponents(): boolean;
getBasePlugin(): any;
}
interface ContainerPluginDefinition {
getBasePlugin():Plugin;
}
/**
* An abstract component factory capable of instantiating a component into a DOM Element.
*/
interface ComponentFactory {
/**
* Obtains the class of the component this factory can create.
*
* @returns The class of the component created by this factory
*/
getClass(): ComponentClass;
/**
* Obtains the set of capabilities offered by the component created by this factory.
*
* @returns An array of capabilities offered by this component.
*/
getCapabilities(): Capability[];
/**
* Instantiates the component into the specified DOM element and returns an implementation of the component's capabilities.
*
* @param target The DOM element into which the component should be constructed
* @returns An implementation of the instances corresponding to the capabilities offered by this component
*/
instantiateIntoDOM(target: HTMLElement): Observable<IComponent>;
}
/**
* A registry of component factories.
*/
interface Registry {
/**
* Registers a component factory into the registry. Subsequent calls to `getComponentFactories` will be able to retrieve this factory.
*/
registerComponentFactory(factory: ComponentFactory): void;
/**
* Gets a component factory of the specified class offering the specified capabilities.
*
* @param componentClass The class of component desired
* @param capabilities An array containing the desired capabilities
* @returns An array of component factories that create components of the specified type with the specified capabilities
*/
getComponentFactories(componentClass: ComponentClass, capabilities: Capability[]): ComponentFactory[];
}
const enum ComponentClass {
Editor = "zlux.component-class.editor",
FileBrowser = "zlux.component-class.file-browser"
}
/**
* The union type of all capabilities. This type encompasses the capabilities offered by all classes of components.
*/
type Capability = EditorCapabilities | FileBrowserCapabilities;
/**
* The capabilities offered by editor components.
*/
const enum EditorCapabilities {
/**
* The capability of a basic editor, providing at least single buffer editing functionality. This capability is required for all editors.
*/
Editor = 'zlux.capability.editor',
/**
* The editor offers multi-buffer editting.
*/
EditorMultiBuffer = 'zlux.capability.editor.multi_buffer',
/**
* The editor offers syntax highlighting.
*/
EditorSyntaxHighlighting = 'zlux.capability.editor.syntax_highlighting',
/**
* The editor supports project contexts, either for single files or large sets of files.
*/
EditorProjectAware = 'zlux.capability.editor.project_aware',
/**
* The editor is capable of performing build actions.
*/
EditorBuildSupport = 'zlux.capability.editor.build_support',
/**
* The editor is capable of utilizing a language server using the VSCode language server protocol.
*/
EditorLanguageSupport = 'zlux.capability.editor.language_support'
}
/**
* The capabilities offered by a file browser.
*/
const enum FileBrowserCapabilities {
/**
* The capability of a basic file browser. This capability is required for all file browsers.
*/
FileBrowser = 'zlux.capability.file_browser',
/**
* The file browser supports selecting multiple files or folders.
*/
FileBrowserMultiSelect = 'zlux.capability.file_browser.multi_select',
/**
* The file browser supports selecting folders.
*/
FileBrowserFolderSelect = 'zlux.capability.file_browser.folder_select',
/**
* The file browser supports selecting USS files.
*/
FileBrowserUSS = 'zlux.capability.file_browser.uss',
/**
* The file browser supports selecting MVS datasets.
*/
FileBrowserMVS = 'zlux.capability.file_browser.mvs'
}
/**
* The base interface for a component. It provides functionality to determine the DOM element into which the component was rendered and the component's full set of capabilities.
*/
interface IComponent {
/**
* Obtains the DOM element into which the component was rendered.
*
* @returns The DOM element where the component was rendered
*/
getDOMElement(): HTMLElement;
/**
* Obtains all of the component's capabiltiies.
*
* @returns An array of the component's capabilities
*/
getCapabilities(): Capability[];
}
/**
* An opaque handle to a buffer within an editor instance.
*/
type EditorBufferHandle = any;
/**
* An opaque handle to a project within an editor instance.
*/
type EditorProjectHandle = any;
/**
* The set of potential build results.
*/
const enum BuildStatus {
/**
* Indicates a successful build with no warnings or errors.
*/
Success = 0,
/**
* Indicates a warning produced during the build process.
*/
Warning = 1,
/**
* Indicates an error produced during the build process.
*/
Error = 2,
/**
* Indicates a failure of the build system above the level of code warnings or errors.
*/
Fatal = 3
}
/**
* Contains the results from an attempted build.
*/
interface BuildResult {
/**
* The final status of the build.
*/
finalStatus: BuildStatus;
}
/**
* The definition of a language server that can be used in the editor. It adheres to the VSCode Language Server Protocol.
*/
interface IEditorLanguageServer {
/**
* Gets the language supported by this server.
*
* @returns The name of the language supported by this server
*/
getSupportedLanguage(): string;
/*
* TODO: implementation of the language server API
*/
}
/**
* Contains information about an event triggered when a file is opened into a buffer.
*/
interface EditorFileOpenedEvent {
/**
* A handle to the buffer into which the file is opened.
*/
buffer: EditorBufferHandle;
/**
* The file opened into the buffer.
*/
file: string;
}
/**
* Contains information about an event triggered when a buffer is saved into a file.
*/
interface EditorBufferSavedEvent {
/**
* A handle to the buffer that was saved into the file.
*/
buffer: EditorBufferHandle;
/**
* The file into which the buffer was saved.
*/
file: string;
}
/**
* Contains information about an event triggered when a new buffer is created.
*/
interface EditorBufferCreatedEvent {
/**
* A handle to the new buffer created within the editor
*/
buffer: EditorBufferHandle;
}
/**
* Contains information about an event triggered when a buffer is closed.
*/
interface EditorBufferDestroyedEvent {
/**
* A handle to the buffer that was closed.
*/
buffer: EditorBufferHandle;
/**
* The path of the file that was open in the buffer, if available.
*/
file: string | null;
}
/**
* The abstract interface for a basic text editor, providing at least one buffer and basic open/save functionality.
*/
interface IEditor extends IComponent {
/**
* Get a handle to the primary (currently focused) buffer in the editor.
*
* @returns A handle to the primary buffer in the editor
*/
getPrimaryBuffer(): EditorBufferHandle;
/**
* Get the path of the file currently open in a given buffer.
*
* @param buffer A handle to the buffer
* @returns The path of the file open in that buffer, or null if the buffer is not associated with a file.
*/
getBufferPath(buffer: EditorBufferHandle): string | null;
/**
* Open a file into a buffer.
*
* @param file The path of the file that should be opened
* @param targetBuffer The buffer into which the file should be opened, or null to open a new buffer
* @returns An observable that pushes a handle to the buffer into which the file was opened
*/
openBuffer(file: string, targetBuffer: EditorBufferHandle | null): Observable<EditorBufferHandle>;
/**
* Save a buffer into a file.
*
* @param buffer The buffer that should be saved
* @param path The path of the file into which the buffer should be saved, or null if the buffer is already associated with a file
* @returns An observable that pushes when the file has been saved
*/
saveBuffer(buffer: EditorBufferHandle, path: string | null): Observable<void>;
/**
* Get the contents of a buffer.
*
* @param buffer The buffer that should be read
* @returns An observable that pushes the contents of the buffer.
*/
getBufferContents(buffer: EditorBufferHandle): Observable<string>;
/**
* Checks if the buffer has been modified.
*
* @param buffer The buffer to be checked
* @returns An observable that pushes whether or not the buffer has been modified
*/
isBufferModified(buffer: EditorBufferHandle): Observable<boolean>;
/**
* An event that is triggered when a file is opened inside the editor.
*/
fileOpened: Subject<EditorFileOpenedEvent>;
/**
* An event that is triggered when a file is saved inside the editor.
*/
bufferSaved: Subject<EditorBufferSavedEvent>;
}
/**
* The abstract interface for a multi-buffer editor, providing functionality for managing multiple buffers.
*/
interface IEditorMultiBuffer extends IEditor {
/**
* Get the set of open buffers.
*
* @returns An array of handles for all buffers open in the editor
*/
getOpenBuffers(): EditorBufferHandle[];
/**
* Create a new buffer in the editor.
*
* @returns A handle to the newly created buffer.
*/
createBuffer(): EditorBufferHandle;
/**
* Destroys an existing buffer inside the editor.
*
* @param buffer The buffer that should be destroyed
* @param force True to close the buffer even if it contains unsaved content, false to prompt the user
* @returns An observable that pushes when buffer is destroyed
*/
destroyBuffer(buffer: EditorBufferHandle, force: boolean): Observable<void>;
/**
* An event that is triggered when a new buffer is created.
*/
bufferCreated: Subject<EditorBufferCreatedEvent>;
/**
* An event that is triggered when a buffer is destroyed.
*/
bufferDestroyed: Subject<EditorBufferDestroyedEvent>;
}
/**
* The abstract interface for a buffer capable of syntax highlighting for languages.
*/
interface IEditorSyntaxHighlighting extends IEditor {
/**
* Sets the highlighting mode for a given buffer.
*
* @param buffer The buffer for which the highlighting mode should be set
* @param language The highlighting mode for the buffer
*/
setHighlightingModeForBuffer(buffer: EditorBufferHandle, language: string): void;
/**
* Gets the highlighting mode for a given buffer.
*
* @param buffer The buffer for which the highlighting mode should be checked
* @returns The highlighting mode of the buffer
*/
getHighlightingModeForBuffer(buffer: EditorBufferHandle): string;
/**
* Gets recommendations for the highlighting mode based on the contents or file associated with a given buffer.
*
* @param buffer The buffer for which the recommendations should be issued
* @returns An observable that pushes an array of recommended highlighting modes for the buffer
*/
getRecommendedHighlightingModesForBuffer(buffer: EditorBufferHandle): Observable<string[]>;
/**
* Gets the set of supported highlighting modes for this editor.
*
* @returns An observable that pushes an array of supported highlighting modes
*/
getSupportedHighlightingModes(): Observable<string[]>;
}
/**
* The abstract interface for an editor capable of managing one or more projects for development, building, or testing.
*/
interface IEditorProjectAware extends IEditor {
/**
* Gets the full set of projects open in the editor.
*
* @returns An array of handles to the editor's open projects.
*/
getOpenProjects(): EditorProjectHandle[];
/**
* Gets the root directory or file of the current project. For editors that support single-file projects, this may be a file path.
*
* @param project The project to be inspected
* @returns The root path of the current project
*/
getProjectRoot(project: EditorProjectHandle): string;
}
/**
* The abstract interface for an editor capable of building projects.
*
* In the future, this interface will be extended to support a full VSCode Debug Protocol-based build and debug system.
*/
interface IEditorBuildSupport extends IEditorProjectAware {
/**
* Perform a builds and returns the results of that build.
*
* @param buildParams Any parameters that should be passed to the build operation
* @returns An observable that returns the results of the build
*/
performBuild(buildParams: any): Observable<BuildResult>;
}
interface IEditorLanguageSupport extends IEditor {
/**
* Obtains the set of built-in language servers for the editor.
*
* @returns The set of built-in language servers for the editor.
*/
getBuiltInLanguageServers(): IEditorLanguageServer[];
/**
* Attaches a language server for parsing a given buffer.
*
* @param buffer The buffer for which to attach the language server
* @param server The server to attach to the buffer
*/
attachLanguageServer(buffer: EditorBufferHandle, server: IEditorLanguageServer): void;
/**
* Gets the recommended languages for a given buffer, if avilable. These recommendations may be made based on open files, content, or other contextual information.
*
* @param buffer The buffer for which to issue recommendations
* @returns A set of recommendations for the contents of the buffer
*/
getRecommendedLanguagesForBuffer(buffer: EditorBufferHandle): Observable<string[]>;
}
/**
* The information associated with an event triggered when a file has been selected.
*/
interface FileBrowserFileSelectedEvent {
/**
* An array of the paths of the selected files.
*/
path: string[];
}
/**
* The interface for a basic file browser. It supports functionality for retrieving the selected path and issues events when a new file is selected.
*/
interface IFileBrowser extends IComponent {
/**
* Gets the currently selected path in the file browser.
*
* @returns The selected path
*/
getSelectedPath(): string;
/**
* Opens the file browser to a specified file or directory.
*
* @param path The path to which the browser should be opened
*/
browsePath(path: string): void;
/**
* An event that is triggered when a file is selected in the file browser. It contains information about the chosen file.
*/
fileSelected: Subject<FileBrowserFileSelectedEvent>;
}
/**
* The interface for a file browser supporting multi-select.
*/
interface IFileBrowserMultiSelect extends IFileBrowser {
/**
* Gets the set of currently selected files in the file browser.
*/
getSelectedPaths(): string[];
}
/**
* The interface for a file browser supporting folder selection.
*/
interface IFileBrowserFolderSelect extends IFileBrowser {
}
/**
* The interface for a file browser supporting USS file selection.
*/
interface IFileBrowserUSS extends IFileBrowser {
}
/**
* The interface for a file browser supporting MVS dataset selection.
*/
interface IFileBrowserMVS extends IFileBrowser {
}
}
/* We assume the presence of a global require function for acquiring shared libraries */
declare const require: (identifier: string) => any;
declare var ZoweZLUX: typeof ZoweZLUXResources;
declare class ZoweZLUXResources {
//previously was PluginManager
static pluginManager: any;
static uriBroker: ZLUX.UriBroker;
static dispatcher: ZLUX.Dispatcher;
static environment: ZLUX.Environment;
static logger: ZLUX.Logger;
static registry: ZLUX.Registry;
//previously was NotificationManager
static notificationManager: any;
static globalization: ZLUX.Globalization;
}
interface Window {
GIZA_PLUGIN_TO_BE_LOADED?: string;
GIZA_SIMPLE_CONTAINER_REQUESTED?: boolean;
GIZA_ENVIRONMENT?: string;
ZOWE_SWM_SHOW_LOGIN?: boolean;
COM_RS_COMMON_LOGGER: Logger;
ZoweZLUX: typeof ZoweZLUXResources;
}
/*
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/