import org.eclipse.lsp4j.DidChangeConfigurationParams;
import org.eclipse.lsp4j.DidChangeWatchedFilesParams;
import org.eclipse.lsp4j.MessageType;
import org.eclipse.lsp4j.RenameFilesParams;
import org.eclipse.lsp4j.services.WorkspaceService;

/**
 * WorkspaceService implementation for the Progress language server.
 *
 * <p>This class implements {@link WorkspaceService} and handles workspace-related
 * LSP notifications such as configuration changes, file changes, and file renames.
 * In this implementation, these operations are logged for debugging purposes using
 * {@link LSClientLogger}.</p>
 */
public class ProgressWorkSpaceService implements WorkspaceService {

   private final ProgressLanguageServer languageServer;
   private final LSClientLogger clientLogger;

   /**
    * Constructs a new ProgressWorkSpaceService.
    *
    * @param languageServer the parent {@link ProgressLanguageServer} instance
    */
   public ProgressWorkSpaceService(ProgressLanguageServer languageServer) {
      this.languageServer = languageServer;
      this.clientLogger = LSClientLogger.getInstance();
   }

   /**
    * Called when the client changes its configuration.
    *
    * @param didChangeConfigurationParams the configuration change parameters
    */
   @Override
   public void didChangeConfiguration(DidChangeConfigurationParams didChangeConfigurationParams) {
      this.clientLogger.logMessage(
              "Operation 'workspace/didChangeConfiguration'",
              MessageType.Error
      );
   }

   /**
    * Called when files in the workspace are created, changed, or deleted.
    *
    * @param didChangeWatchedFilesParams the file change notification parameters
    */
   @Override
   public void didChangeWatchedFiles(DidChangeWatchedFilesParams didChangeWatchedFilesParams) {
      this.clientLogger.logMessage(
              "Operation 'workspace/didChangeWatchedFiles'",
              MessageType.Error
      );
   }

   /**
    * Called when files in the workspace are renamed.
    *
    * @param params the file rename parameters
    */
   @Override
   public void didRenameFiles(RenameFilesParams params) {
      this.clientLogger.logMessage(
              "Operation 'workspace/didRenameFiles'",
              MessageType.Error
      );
   }
}
