# zowe/zowe-explorer-intellij architecture

> Architecture diagram of the GitHub repository zowe/zowe-explorer-intellij, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zowe/zowe-explorer-intellij
- Repository: https://github.com/zowe/zowe-explorer-intellij

## Overview

##### Main Components
- Plugin Integration Layer: Represent the plugin’s integration with the IntelliJ platform. This includes the entry points defined in the plugin.xml, startup activities, components like UIComponentManager, and various action classes (e.g., AddConnectionAction, SubmitJobAction).
- UI/Explorer Components: Capture the explorer views, dialogs, tree structures, and all UI-related elements (e.g., FileExplorer, ExplorerContentProvider, various dialogs and UI components in both src/main/kotlin/org/zowe/explorer/ui/ and the uiTest directories).
- Connection and Configuration Services: Show all connection configuration classes and services (e.g., ZosmfApi, ZosmfApiImpl, ConfigService, ConnectionConfig, CredentialService) that manage the data needed to connect to z/OS systems.
- Data Operations and Synchronization: Include components for handling operations on mainframe data (e.g., file creation, renaming, allocation, moving) and for content synchronization (e.g., SyncProcessService, various content synchronizers and adapters).
- External Services: The external z/OSMF REST API integration should be highlighted, showing how the plugin acts as a client to z/OS services.

##### Relationships and Interactions
- The plugin’s initialization connects the IntelliJ platform with the plugin’s core functionality.
- UI components (dialogs, explorers, action handlers) interact with the configuration services to obtain connection details and then trigger data operations.
- Data operations and synchronization components make calls to the z/OSMF REST API adapter (ZosmfApiImpl) to perform operations on mainframe datasets, files, and jobs.
- Testing components can be depicted as separate suites validating both UI flows (using simulated IntelliJ interactions) and headless unit tests.

##### Architectural Patterns and Principles
- The project follows a modular, layered architecture separating the UI, business logic, and integration (API communication). This is analogous to MVC/MVP patterns where views (UI components) do not directly contain business logic.
- There is a strong emphasis on extensibility with clear separation of concerns (e.g., using adapters for content operations and distinct services for configuration and synchronization).
- The use of Gradle, GitHub workflows, and Sonar for build and quality demonstrates standard CI/CD practices.

##### Relevant Technologies and Frameworks
- IntelliJ Platform SDK as the fundamental base for the plugin.
- Kotlin as the primary programming language.
- Gradle (build.gradle.kts, gradle wrapper) for the build process.
- z/OSMF REST API for mainframe interaction.
- Testing frameworks integrated via Kotest and additional UI testing tooling.
- External tooling for dependency management (e.g., owasp-dependency-check-suppression.xml, SonarCloud integration).

##### Instructing the Principal Software Engineer
- User interactions initiating actions in the plugin.
- Data flow from the UI through configuration to the API layer.
- Callback flows from the API back to update the UI.

– Show integration with the IntelliJ platform, the custom UI elements, the business logic for handling mainframe data operations, and the external connection via z/OSMF.
This comprehensive breakdown will help anyone reviewing the system design understand how each part of the Zowe Explorer plug‐in interacts with the others and ensure that the essential architectural elements are captured accurately.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Plugin Integration Layer
    subgraph "Plugin Integration Layer"
        PI1["Plugin Entry Point"]:::integration
        PI2["IntelliJ Actions"]:::integration
        PI3["UI Component Manager"]:::integration
    end

    %% UI & Explorer Components
    subgraph "UI & Explorer Components"
        UI1["Explorer Components"]:::ui
        UI2["Additional UI Components"]:::ui
        UI3["UI Test Components"]:::test
    end

    %% Connection & Configuration Services
    subgraph "Connection & Configuration Services"
        CS1["Config Services"]:::config
        CS2["Credential Management"]:::config
        CS3["API Interface"]:::config
    end

    %% Data Operations & Synchronization
    subgraph "Data Operations & Synchronization"
        DS1["Data Operations"]:::dataops
        DS2["Sync Process Service"]:::dataops
        DS3["Content Synchronizers"]:::dataops
    end

    %% External Services
    subgraph "External Services"
        EX["External z/OSMF REST API"]:::external
    end

    %% Testing Infrastructure
    subgraph "Testing Infrastructure"
        T1["Unit Tests"]:::test
        T2["UI Tests"]:::test
    end

    %% Relationships
    PI1 -->|"initializes"| PI2
    PI2 -->|"triggers"| PI3
    PI3 -->|"loadsUI"| UI1
    UI1 -->|"retrievesConfig"| CS1
    UI2 -->|"retrievesConfig"| CS1
    CS1 -->|"fetches"| CS2
    CS2 -->|"providesCreds"| CS3
    CS3 -->|"callsAPI"| DS1
    DS1 -->|"RESTCall"| EX
    EX -->|"RESTResponse"| DS1
    DS1 -->|"updatesUI"| UI1
    DS1 -->|"triggersSync"| DS2
    DS2 -->|"syncsContent"| DS3

    %% Testing validations (dashed lines)
    DS1 ---|"unitTests"| T1
    UI1 ---|"uiTests"| T2

    %% Click Events for Plugin Integration Layer
    click PI1 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/resources/META-INF/plugin.xml"
    click PI2 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/main/kotlin/org/zowe/explorer/explorer/actions"
    click PI3 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/explorer/UIComponentManager.kt"
    click PI3 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/explorer/UIComponentManagerImpl.kt"

    %% Click Events for UI/Explorer Components
    click UI1 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/main/kotlin/org/zowe/explorer/explorer"
    click UI2 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/main/kotlin/org/zowe/explorer/ui"
    click UI3 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/uiTest/kotlin/auxiliary/components"
    click UI3 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/uiTest/kotlin/auxiliary/containers"

    %% Click Events for Connection and Configuration Services
    click CS1 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/config/ConfigService.kt"
    click CS1 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/config/ConfigServiceImpl.kt"
    click CS2 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/main/kotlin/org/zowe/explorer/config/connect"
    click CS3 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/api/ZosmfApi.kt"
    click CS3 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/api/ZosmfApiImpl.kt"

    %% Click Events for Data Operations and Synchronization
    click DS1 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/main/kotlin/org/zowe/explorer/dataops"
    click DS2 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/dataops/content/service/SyncProcessService.kt"
    click DS2 "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/dataops/content/service/SyncProcessServiceImpl.kt"
    click DS3 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/main/kotlin/org/zowe/explorer/dataops/content/synchronizer"

    %% Click Event for External Services
    click EX "https://github.com/zowe/zowe-explorer-intellij/blob/release/v2.1.1/src/main/kotlin/org/zowe/explorer/api/ZosmfApiImpl.kt"

    %% Click Events for Testing Infrastructure
    click T1 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/test/kotlin/org/zowe/explorer/"
    click T2 "https://github.com/zowe/zowe-explorer-intellij/tree/release/v2.1.1/src/uiTest/kotlin"

    %% Styles
    classDef integration fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef ui fill:#C1E1C1,stroke:#333,stroke-width:2px,rx:5,ry:5;
    classDef config fill:#FFFACD,stroke:#333,stroke-width:2px;
    classDef dataops fill:#F08080,stroke:#333,stroke-width:2px;
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:2px;
    classDef test fill:#EEEEEE,stroke:#888,stroke-dasharray: 5 5,stroke-width:2px;
```
