From 12d4d7167dfa7855e88b1c7610e2ac32dd7cfc5b Mon Sep 17 00:00:00 2001 From: azerr Date: Fri, 1 Dec 2023 09:06:05 +0100 Subject: [PATCH] refactor: Remove 'intellij' from package name. Signed-off-by: azerr --- .../lsp4ij/AbstractDocumentMatcher.java | 4 +- .../lsp4ij/AbstractLSPInlayProvider.java | 6 +- .../lsp4ij/CompletableFutures.java | 2 +- ...umentToLanguageServerSetupParticipant.java | 10 ++-- ...ContentTypeToLanguageServerDefinition.java | 2 +- .../lsp4ij/DocumentContentSynchronizer.java | 2 +- .../lsp4ij/DocumentMatcher.java | 3 +- .../{intellij => }/lsp4ij/LSPIJUtils.java | 5 +- .../lsp4ij/LSPVirtualFileData.java | 6 +- .../LanguageMappingExtensionPointBean.java | 3 +- .../lsp4ij/LanguageServerBundle.java | 2 +- .../LanguageServerIconProviderDefinition.java | 2 +- .../lsp4ij/LanguageServerItem.java | 2 +- .../lsp4ij/LanguageServerWrapper.java | 12 ++-- .../lsp4ij/LanguageServersRegistry.java | 6 +- .../lsp4ij/LanguageServiceAccessor.java | 4 +- .../lsp4ij/ServerExtensionPointBean.java | 4 +- .../lsp4ij/ServerIconProvider.java | 2 +- .../ServerIconProviderExtensionPointBean.java | 2 +- .../lsp4ij/ServerMessageHandler.java | 2 +- .../{intellij => }/lsp4ij/ServerStatus.java | 2 +- .../lsp4ij/client/CoalesceByKey.java | 2 +- ...ExecutionAttemptLimitReachedException.java | 2 +- .../client/IndexAwareLanguageClient.java | 4 +- .../lsp4ij/client/LSPCompletableFuture.java | 4 +- .../lsp4ij/client/LSPProgressIndicator.java | 3 +- .../lsp4ij/client/LanguageClientImpl.java | 10 ++-- .../lsp4ij/commands/CommandExecutor.java | 12 ++-- .../console/LSPConsoleToolWindowFactory.java | 4 +- .../console/LSPConsoleToolWindowPanel.java | 16 +++--- .../lsp4ij/console/LSPConsoleView.java | 17 +++--- .../console/LSPTextConsoleBuilderImpl.java | 7 +-- .../lsp4ij/console/SimpleCardLayoutPanel.java | 2 +- .../console/actions/AutoFoldingAction.java | 4 +- .../actions/ClearThisConsoleAction.java | 2 +- .../explorer/LanguageServerExplorer.java | 18 +++--- ...nguageServerExplorerLifecycleListener.java | 12 ++-- .../LanguageServerProcessTreeNode.java | 6 +- .../explorer/LanguageServerTreeNode.java | 4 +- .../explorer/LanguageServerTreeRenderer.java | 4 +- .../explorer/TracingMessageConsumer.java | 4 +- .../actions/CopyStartServerCommandAction.java | 5 +- .../explorer/actions/PauseServerAction.java | 5 +- .../explorer/actions/RestartServerAction.java | 9 +-- .../explorer/actions/StopServerAction.java | 5 +- .../console/explorer/actions/TreeAction.java | 8 +-- .../AbstractDelegateInspection.java | 2 +- ...tractDelegateInspectionWithExclusions.java | 2 +- .../lsp4ij/internal/CancellationSupport.java | 2 +- .../lsp4ij/internal/CancellationUtil.java | 2 +- .../internal/PromiseToCompletableFuture.java | 4 +- .../lsp4ij/internal/StringUtils.java | 2 +- .../lsp4ij/internal/SupportedFeatures.java | 2 +- .../LanguageServerLifecycleListener.java | 4 +- .../LanguageServerLifecycleManager.java | 4 +- .../NullLanguageServerLifecycleManager.java | 2 +- .../LSPLazyCodeActionIntentionAction.java | 12 ++-- .../codeactions/LSPLazyCodeActions.java | 8 +-- .../codelens/LSPCodelensInlayProvider.java | 10 ++-- .../completion/CompletionPrefix.java | 10 ++-- .../completion/CompletionProposalTools.java | 4 +- .../completion/LSPCompletionConfidence.java | 2 +- .../completion/LSPCompletionContributor.java | 12 ++-- .../completion/LSPCompletionProposal.java | 21 ++++--- .../completion/SnippetTemplateFactory.java | 6 +- .../completion/SnippetTemplateLoader.java | 8 +-- .../snippet/AbstractLspSnippetHandler.java | 2 +- .../snippet/DefaultLspSnippetHandler.java | 2 +- .../completion/snippet/Location.java | 2 +- .../completion/snippet/LspSnippetHandler.java | 2 +- .../snippet/LspSnippetIndentOptions.java | 2 +- .../completion/snippet/LspSnippetParser.java | 2 +- .../snippet/LspSnippetVariableConstants.java | 2 +- .../completion/snippet/ParseException.java | 2 +- .../diagnostics/LSPDiagnosticAnnotator.java | 14 ++--- .../diagnostics/LSPDiagnosticHandler.java | 10 ++-- .../diagnostics/LSPDiagnosticsForServer.java | 10 ++-- .../operations/diagnostics/LSPPSiElement.java | 2 +- .../diagnostics/LSPPsiReference.java | 2 +- .../diagnostics/SeverityMapping.java | 2 +- .../LSPDocumentLinkAnnotator.java | 12 ++-- .../LSPDocumentLinkForServer.java | 4 +- ...LSPDocumentLinkGotoDeclarationHandler.java | 10 ++-- .../LSPDocumentationProvider.java | 6 +- .../LSPPsiElementForLookupItem.java | 2 +- .../documentation/LSPTextHoverForFile.java | 12 ++-- .../highlight/LSPHighlightPsiElement.java | 5 +- .../highlight/LSPHighlightUsagesHandler.java | 4 +- .../LSPHighlightUsagesHandlerFactory.java | 9 ++- .../inlayhint/LSPInlayHintInlayProvider.java | 10 ++-- .../navigation/LSPGotoDeclarationHandler.java | 11 ++-- .../server/CannotStartProcessException.java | 2 +- .../server/CannotStartServerException.java | 2 +- .../server/JavaProcessCommandBuilder.java | 4 +- .../server/LanguageServerException.java | 2 +- .../{intellij => }/lsp4ij/server/OS.java | 2 +- .../ProcessStreamConnectionProvider.java | 2 +- .../server/StreamConnectionProvider.java | 2 +- .../settings/LanguageServerConfigurable.java | 4 +- .../LanguageServerListConfigurable.java | 6 +- .../lsp4ij/settings/LanguageServerView.java | 7 +-- .../lsp4ij/settings/ServerTrace.java | 2 +- .../UserDefinedLanguageServerSettings.java | 4 +- .../{intellij => }/lsp4ij/ui/IconMapper.java | 2 +- .../{intellij => }/lsp4ij/ui/Messages.java | 2 +- .../ui/components/InspectionHyperlink.java | 2 +- src/main/resources/META-INF/plugin.xml | 38 ++++++------- .../completion/snippet/AdvancedTest.java | 39 ------------- .../ExtractSnippetLinkedPositionTest.java | 57 ------------------- .../completion/snippet/TabstopTest.java | 52 ----------------- .../completion/snippet/AdvancedTest.java | 39 +++++++++++++ .../completion/snippet/ChoiceTest.java | 6 +- .../ExtractSnippetLinkedPositionTest.java | 55 ++++++++++++++++++ .../completion/snippet/LspSnippetAssert.java | 4 +- .../completion/snippet/PlaceholderTest.java | 10 ++-- .../completion/snippet/TabstopTest.java | 50 ++++++++++++++++ .../completion/snippet/TextTest.java | 6 +- .../completion/snippet/VariableTest.java | 6 +- .../snippet/handler/ChoiceNode.java | 2 +- .../ExtractSnippetLinkedPositionHandler.java | 8 +-- .../snippet/handler/LinkedPosition.java | 2 +- .../snippet/handler/LinkedPositionResult.java | 2 +- .../handler/LspSnippetHandlerImpl.java | 4 +- .../snippet/handler/LspSnippetNode.java | 2 +- .../snippet/handler/PlaceholderNode.java | 2 +- .../snippet/handler/TabstopNode.java | 2 +- .../completion/snippet/handler/TextNode.java | 2 +- .../snippet/handler/VariableNode.java | 2 +- .../lsp4ij/ui/IconMapperTest.java | 4 +- 129 files changed, 454 insertions(+), 497 deletions(-) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/AbstractDocumentMatcher.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/AbstractLSPInlayProvider.java (97%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/CompletableFutures.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ConnectDocumentToLanguageServerSetupParticipant.java (89%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ContentTypeToLanguageServerDefinition.java (97%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/DocumentContentSynchronizer.java (99%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/DocumentMatcher.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LSPIJUtils.java (99%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LSPVirtualFileData.java (87%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LanguageMappingExtensionPointBean.java (91%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LanguageServerBundle.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LanguageServerIconProviderDefinition.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LanguageServerItem.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LanguageServerWrapper.java (99%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LanguageServersRegistry.java (98%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/LanguageServiceAccessor.java (99%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ServerExtensionPointBean.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ServerIconProvider.java (61%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ServerIconProviderExtensionPointBean.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ServerMessageHandler.java (98%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ServerStatus.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/client/CoalesceByKey.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/client/ExecutionAttemptLimitReachedException.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/client/IndexAwareLanguageClient.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/client/LSPCompletableFuture.java (89%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/client/LSPProgressIndicator.java (88%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/client/LanguageClientImpl.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/commands/CommandExecutor.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/LSPConsoleToolWindowFactory.java (91%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/LSPConsoleToolWindowPanel.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/LSPConsoleView.java (85%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/LSPTextConsoleBuilderImpl.java (80%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/SimpleCardLayoutPanel.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/actions/AutoFoldingAction.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/actions/ClearThisConsoleAction.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/LanguageServerExplorer.java (89%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/LanguageServerExplorerLifecycleListener.java (91%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/LanguageServerProcessTreeNode.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/LanguageServerTreeNode.java (90%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/LanguageServerTreeRenderer.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/TracingMessageConsumer.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/actions/CopyStartServerCommandAction.java (89%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/actions/PauseServerAction.java (84%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/actions/RestartServerAction.java (80%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/actions/StopServerAction.java (84%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/console/explorer/actions/TreeAction.java (85%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/inspections/AbstractDelegateInspection.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/inspections/AbstractDelegateInspectionWithExclusions.java (97%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/internal/CancellationSupport.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/internal/CancellationUtil.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/internal/PromiseToCompletableFuture.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/internal/StringUtils.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/internal/SupportedFeatures.java (97%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/lifecycle/LanguageServerLifecycleListener.java (87%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/lifecycle/LanguageServerLifecycleManager.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/lifecycle/NullLanguageServerLifecycleManager.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/codeactions/LSPLazyCodeActionIntentionAction.java (91%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/codeactions/LSPLazyCodeActions.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/codelens/LSPCodelensInlayProvider.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/CompletionPrefix.java (89%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/CompletionProposalTools.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/LSPCompletionConfidence.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/LSPCompletionContributor.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/LSPCompletionProposal.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/SnippetTemplateFactory.java (88%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/SnippetTemplateLoader.java (89%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/AbstractLspSnippetHandler.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/DefaultLspSnippetHandler.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/Location.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/LspSnippetHandler.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/LspSnippetIndentOptions.java (95%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/LspSnippetParser.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/LspSnippetVariableConstants.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/ParseException.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/diagnostics/LSPDiagnosticAnnotator.java (85%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/diagnostics/LSPDiagnosticHandler.java (90%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/diagnostics/LSPDiagnosticsForServer.java (89%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/diagnostics/LSPPSiElement.java (99%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/diagnostics/LSPPsiReference.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/diagnostics/SeverityMapping.java (98%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/documentLink/LSPDocumentLinkAnnotator.java (91%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/documentLink/LSPDocumentLinkForServer.java (88%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/documentLink/LSPDocumentLinkGotoDeclarationHandler.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/documentation/LSPDocumentationProvider.java (97%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/documentation/LSPPsiElementForLookupItem.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/documentation/LSPTextHoverForFile.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/highlight/LSPHighlightPsiElement.java (89%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/highlight/LSPHighlightUsagesHandler.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/highlight/LSPHighlightUsagesHandlerFactory.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/inlayhint/LSPInlayHintInlayProvider.java (96%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/navigation/LSPGotoDeclarationHandler.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/server/CannotStartProcessException.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/server/CannotStartServerException.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/server/JavaProcessCommandBuilder.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/server/LanguageServerException.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/server/OS.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/server/ProcessStreamConnectionProvider.java (98%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/server/StreamConnectionProvider.java (98%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/settings/LanguageServerConfigurable.java (94%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/settings/LanguageServerListConfigurable.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/settings/LanguageServerView.java (93%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/settings/ServerTrace.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/settings/UserDefinedLanguageServerSettings.java (92%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ui/IconMapper.java (98%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ui/Messages.java (98%) rename src/main/java/com/redhat/devtools/{intellij => }/lsp4ij/ui/components/InspectionHyperlink.java (97%) delete mode 100644 src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/AdvancedTest.java delete mode 100644 src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ExtractSnippetLinkedPositionTest.java delete mode 100644 src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/TabstopTest.java create mode 100644 src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/AdvancedTest.java rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/ChoiceTest.java (75%) create mode 100644 src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ExtractSnippetLinkedPositionTest.java rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/LspSnippetAssert.java (92%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/PlaceholderTest.java (63%) create mode 100644 src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/TabstopTest.java rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/TextTest.java (73%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/VariableTest.java (82%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/ChoiceNode.java (93%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/ExtractSnippetLinkedPositionHandler.java (84%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/LinkedPosition.java (92%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/LinkedPositionResult.java (90%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/LspSnippetHandlerImpl.java (89%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/LspSnippetNode.java (86%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/PlaceholderNode.java (92%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/TabstopNode.java (91%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/TextNode.java (91%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/operations/completion/snippet/handler/VariableNode.java (91%) rename src/test/java/com/redhat/devtools/{intellij => }/lsp4ij/ui/IconMapperTest.java (90%) diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/AbstractDocumentMatcher.java b/src/main/java/com/redhat/devtools/lsp4ij/AbstractDocumentMatcher.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/AbstractDocumentMatcher.java rename to src/main/java/com/redhat/devtools/lsp4ij/AbstractDocumentMatcher.java index eca72e645..3e687d053 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/AbstractDocumentMatcher.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/AbstractDocumentMatcher.java @@ -8,13 +8,13 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.internal.PromiseToCompletableFuture; +import com.redhat.devtools.lsp4ij.internal.PromiseToCompletableFuture; import org.jetbrains.annotations.NotNull; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/AbstractLSPInlayProvider.java b/src/main/java/com/redhat/devtools/lsp4ij/AbstractLSPInlayProvider.java similarity index 97% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/AbstractLSPInlayProvider.java rename to src/main/java/com/redhat/devtools/lsp4ij/AbstractLSPInlayProvider.java index fa82cbc44..9e7a676a0 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/AbstractLSPInlayProvider.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/AbstractLSPInlayProvider.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.codeInsight.hints.*; import com.intellij.codeInsight.hints.presentation.PresentationFactory; @@ -25,8 +25,8 @@ import com.intellij.psi.PsiFile; import com.intellij.ui.layout.LCFlags; import com.intellij.ui.layout.LayoutKt; -import com.redhat.devtools.intellij.lsp4ij.commands.CommandExecutor; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationSupport; +import com.redhat.devtools.lsp4ij.commands.CommandExecutor; +import com.redhat.devtools.lsp4ij.internal.CancellationSupport; import org.eclipse.lsp4j.Command; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/CompletableFutures.java b/src/main/java/com/redhat/devtools/lsp4ij/CompletableFutures.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/CompletableFutures.java rename to src/main/java/com/redhat/devtools/lsp4ij/CompletableFutures.java index 623327ee1..172353384 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/CompletableFutures.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/CompletableFutures.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import org.eclipse.lsp4j.jsonrpc.CancelChecker; import org.eclipse.lsp4j.jsonrpc.CompletableFutures.FutureCancelChecker; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ConnectDocumentToLanguageServerSetupParticipant.java b/src/main/java/com/redhat/devtools/lsp4ij/ConnectDocumentToLanguageServerSetupParticipant.java similarity index 89% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ConnectDocumentToLanguageServerSetupParticipant.java rename to src/main/java/com/redhat/devtools/lsp4ij/ConnectDocumentToLanguageServerSetupParticipant.java index 75aee7ace..94219c145 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ConnectDocumentToLanguageServerSetupParticipant.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ConnectDocumentToLanguageServerSetupParticipant.java @@ -8,18 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; -import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.fileEditor.FileEditorManager; import com.intellij.openapi.fileEditor.FileEditorManagerListener; -import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectManagerListener; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.client.CoalesceByKey; -import com.redhat.devtools.intellij.lsp4ij.internal.PromiseToCompletableFuture; -import com.redhat.devtools.intellij.lsp4ij.lifecycle.LanguageServerLifecycleManager; +import com.redhat.devtools.lsp4ij.client.CoalesceByKey; +import com.redhat.devtools.lsp4ij.internal.PromiseToCompletableFuture; +import com.redhat.devtools.lsp4ij.lifecycle.LanguageServerLifecycleManager; import org.jetbrains.annotations.NotNull; import java.text.MessageFormat; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ContentTypeToLanguageServerDefinition.java b/src/main/java/com/redhat/devtools/lsp4ij/ContentTypeToLanguageServerDefinition.java similarity index 97% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ContentTypeToLanguageServerDefinition.java rename to src/main/java/com/redhat/devtools/lsp4ij/ContentTypeToLanguageServerDefinition.java index 7bb582647..d09c0d334 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ContentTypeToLanguageServerDefinition.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ContentTypeToLanguageServerDefinition.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.lang.Language; import com.intellij.openapi.project.Project; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/DocumentContentSynchronizer.java b/src/main/java/com/redhat/devtools/lsp4ij/DocumentContentSynchronizer.java similarity index 99% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/DocumentContentSynchronizer.java rename to src/main/java/com/redhat/devtools/lsp4ij/DocumentContentSynchronizer.java index c830bc81d..4328f0a2b 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/DocumentContentSynchronizer.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/DocumentContentSynchronizer.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.lang.Language; import com.intellij.openapi.application.ApplicationManager; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/DocumentMatcher.java b/src/main/java/com/redhat/devtools/lsp4ij/DocumentMatcher.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/DocumentMatcher.java rename to src/main/java/com/redhat/devtools/lsp4ij/DocumentMatcher.java index 798ad1c05..c2f3cf550 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/DocumentMatcher.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/DocumentMatcher.java @@ -8,12 +8,11 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; -import org.jetbrains.concurrency.CancellablePromise; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LSPIJUtils.java b/src/main/java/com/redhat/devtools/lsp4ij/LSPIJUtils.java similarity index 99% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LSPIJUtils.java rename to src/main/java/com/redhat/devtools/lsp4ij/LSPIJUtils.java index b2d4ce1fd..ca816dba0 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LSPIJUtils.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LSPIJUtils.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.lang.Language; import com.intellij.lang.LanguageUtil; @@ -23,7 +23,6 @@ import com.intellij.openapi.fileEditor.OpenFileDescriptor; import com.intellij.openapi.module.Module; import com.intellij.openapi.project.Project; -import com.intellij.openapi.project.ProjectManager; import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.roots.ProjectFileIndex; import com.intellij.openapi.roots.ProjectRootManager; @@ -33,7 +32,7 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.impl.light.LightRecordField; -import com.redhat.devtools.intellij.lsp4ij.internal.StringUtils; +import com.redhat.devtools.lsp4ij.internal.StringUtils; import org.apache.commons.io.FileUtils; import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.jsonrpc.messages.Either; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LSPVirtualFileData.java b/src/main/java/com/redhat/devtools/lsp4ij/LSPVirtualFileData.java similarity index 87% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LSPVirtualFileData.java rename to src/main/java/com/redhat/devtools/lsp4ij/LSPVirtualFileData.java index 4add3006b..272268524 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LSPVirtualFileData.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LSPVirtualFileData.java @@ -11,11 +11,11 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.operations.diagnostics.LSPDiagnosticsForServer; -import com.redhat.devtools.intellij.lsp4ij.operations.documentLink.LSPDocumentLinkForServer; +import com.redhat.devtools.lsp4ij.operations.diagnostics.LSPDiagnosticsForServer; +import com.redhat.devtools.lsp4ij.operations.documentLink.LSPDocumentLinkForServer; import org.eclipse.lsp4j.Diagnostic; import org.eclipse.lsp4j.DocumentLink; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageMappingExtensionPointBean.java b/src/main/java/com/redhat/devtools/lsp4ij/LanguageMappingExtensionPointBean.java similarity index 91% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageMappingExtensionPointBean.java rename to src/main/java/com/redhat/devtools/lsp4ij/LanguageMappingExtensionPointBean.java index 672b1690e..f656dee3a 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageMappingExtensionPointBean.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LanguageMappingExtensionPointBean.java @@ -1,6 +1,5 @@ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; -import com.intellij.openapi.extensions.AbstractExtensionPointBean; import com.intellij.openapi.extensions.ExtensionPointName; import com.intellij.serviceContainer.BaseKeyedLazyInstance; import com.intellij.util.xmlb.annotations.Attribute; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerBundle.java b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerBundle.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerBundle.java rename to src/main/java/com/redhat/devtools/lsp4ij/LanguageServerBundle.java index 66bd6b1d0..ff7d6b6d7 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerBundle.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerBundle.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.DynamicBundle; import org.jetbrains.annotations.Nls; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerIconProviderDefinition.java b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerIconProviderDefinition.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerIconProviderDefinition.java rename to src/main/java/com/redhat/devtools/lsp4ij/LanguageServerIconProviderDefinition.java index b62b63075..78bea8739 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerIconProviderDefinition.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerIconProviderDefinition.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import javax.swing.*; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerItem.java b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerItem.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerItem.java rename to src/main/java/com/redhat/devtools/lsp4ij/LanguageServerItem.java index d179b0a39..ae0a778c4 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerItem.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerItem.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import org.eclipse.lsp4j.services.LanguageServer; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerWrapper.java b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerWrapper.java similarity index 99% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerWrapper.java rename to src/main/java/com/redhat/devtools/lsp4ij/LanguageServerWrapper.java index 250313422..fa3e6b7a7 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServerWrapper.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerWrapper.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.gson.Gson; @@ -25,11 +25,11 @@ import com.intellij.openapi.vfs.*; import com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter; import com.intellij.util.messages.MessageBusConnection; -import com.redhat.devtools.intellij.lsp4ij.client.LanguageClientImpl; -import com.redhat.devtools.intellij.lsp4ij.internal.SupportedFeatures; -import com.redhat.devtools.intellij.lsp4ij.lifecycle.LanguageServerLifecycleManager; -import com.redhat.devtools.intellij.lsp4ij.lifecycle.NullLanguageServerLifecycleManager; -import com.redhat.devtools.intellij.lsp4ij.server.*; +import com.redhat.devtools.lsp4ij.client.LanguageClientImpl; +import com.redhat.devtools.lsp4ij.internal.SupportedFeatures; +import com.redhat.devtools.lsp4ij.lifecycle.LanguageServerLifecycleManager; +import com.redhat.devtools.lsp4ij.lifecycle.NullLanguageServerLifecycleManager; +import com.redhat.devtools.lsp4ij.server.*; import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.jsonrpc.Launcher; import org.eclipse.lsp4j.jsonrpc.MessageConsumer; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServersRegistry.java b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServersRegistry.java similarity index 98% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServersRegistry.java rename to src/main/java/com/redhat/devtools/lsp4ij/LanguageServersRegistry.java index 7879b2b4e..351d4de17 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServersRegistry.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServersRegistry.java @@ -8,14 +8,14 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.icons.AllIcons; import com.intellij.ide.lightEdit.LightEdit; import com.intellij.lang.Language; import com.intellij.openapi.project.Project; -import com.redhat.devtools.intellij.lsp4ij.client.LanguageClientImpl; -import com.redhat.devtools.intellij.lsp4ij.server.StreamConnectionProvider; +import com.redhat.devtools.lsp4ij.client.LanguageClientImpl; +import com.redhat.devtools.lsp4ij.server.StreamConnectionProvider; import org.eclipse.lsp4j.jsonrpc.Launcher; import org.eclipse.lsp4j.jsonrpc.validation.NonNull; import org.eclipse.lsp4j.services.LanguageServer; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServiceAccessor.java b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServiceAccessor.java similarity index 99% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServiceAccessor.java rename to src/main/java/com/redhat/devtools/lsp4ij/LanguageServiceAccessor.java index e5102782e..303da1e4b 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/LanguageServiceAccessor.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServiceAccessor.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.lang.Language; import com.intellij.openapi.application.ApplicationManager; @@ -16,7 +16,7 @@ import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.server.StreamConnectionProvider; +import com.redhat.devtools.lsp4ij.server.StreamConnectionProvider; import org.eclipse.lsp4j.ServerCapabilities; import org.eclipse.lsp4j.services.LanguageServer; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerExtensionPointBean.java b/src/main/java/com/redhat/devtools/lsp4ij/ServerExtensionPointBean.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerExtensionPointBean.java rename to src/main/java/com/redhat/devtools/lsp4ij/ServerExtensionPointBean.java index a04eb062f..c623c751e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerExtensionPointBean.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ServerExtensionPointBean.java @@ -1,10 +1,10 @@ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.openapi.extensions.ExtensionPointName; import com.intellij.serviceContainer.BaseKeyedLazyInstance; import com.intellij.util.xmlb.annotations.Attribute; import com.intellij.util.xmlb.annotations.Tag; -import com.redhat.devtools.intellij.lsp4ij.server.StreamConnectionProvider; +import com.redhat.devtools.lsp4ij.server.StreamConnectionProvider; import org.jetbrains.annotations.Nullable; public class ServerExtensionPointBean extends BaseKeyedLazyInstance { diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerIconProvider.java b/src/main/java/com/redhat/devtools/lsp4ij/ServerIconProvider.java similarity index 61% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerIconProvider.java rename to src/main/java/com/redhat/devtools/lsp4ij/ServerIconProvider.java index e41b394e0..8749fc7a6 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerIconProvider.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ServerIconProvider.java @@ -1,4 +1,4 @@ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import javax.swing.*; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerIconProviderExtensionPointBean.java b/src/main/java/com/redhat/devtools/lsp4ij/ServerIconProviderExtensionPointBean.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerIconProviderExtensionPointBean.java rename to src/main/java/com/redhat/devtools/lsp4ij/ServerIconProviderExtensionPointBean.java index afecf2ec0..6bb1c3740 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerIconProviderExtensionPointBean.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ServerIconProviderExtensionPointBean.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.openapi.extensions.ExtensionPointName; import com.intellij.serviceContainer.BaseKeyedLazyInstance; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerMessageHandler.java b/src/main/java/com/redhat/devtools/lsp4ij/ServerMessageHandler.java similarity index 98% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerMessageHandler.java rename to src/main/java/com/redhat/devtools/lsp4ij/ServerMessageHandler.java index 2aa0fd81f..66dc0a834 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerMessageHandler.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ServerMessageHandler.java @@ -1,4 +1,4 @@ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; import com.intellij.icons.AllIcons; import com.intellij.notification.Notification; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerStatus.java b/src/main/java/com/redhat/devtools/lsp4ij/ServerStatus.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerStatus.java rename to src/main/java/com/redhat/devtools/lsp4ij/ServerStatus.java index 6851f4f61..0a39495d0 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ServerStatus.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ServerStatus.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij; +package com.redhat.devtools.lsp4ij; /** * Language server status. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/CoalesceByKey.java b/src/main/java/com/redhat/devtools/lsp4ij/client/CoalesceByKey.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/client/CoalesceByKey.java rename to src/main/java/com/redhat/devtools/lsp4ij/client/CoalesceByKey.java index 3409331db..b87fae3ab 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/CoalesceByKey.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/client/CoalesceByKey.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.client; +package com.redhat.devtools.lsp4ij.client; import java.util.Arrays; import java.util.Objects; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/ExecutionAttemptLimitReachedException.java b/src/main/java/com/redhat/devtools/lsp4ij/client/ExecutionAttemptLimitReachedException.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/client/ExecutionAttemptLimitReachedException.java rename to src/main/java/com/redhat/devtools/lsp4ij/client/ExecutionAttemptLimitReachedException.java index 2d506fb8a..08a9dff7e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/ExecutionAttemptLimitReachedException.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/client/ExecutionAttemptLimitReachedException.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.client; +package com.redhat.devtools.lsp4ij.client; /** diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/IndexAwareLanguageClient.java b/src/main/java/com/redhat/devtools/lsp4ij/client/IndexAwareLanguageClient.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/client/IndexAwareLanguageClient.java rename to src/main/java/com/redhat/devtools/lsp4ij/client/IndexAwareLanguageClient.java index 2edfab37c..885db4031 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/IndexAwareLanguageClient.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/client/IndexAwareLanguageClient.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.client; +package com.redhat.devtools.lsp4ij.client; import com.intellij.openapi.module.Module; import com.intellij.openapi.progress.ProgressIndicator; @@ -16,7 +16,7 @@ import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.vfs.VfsUtil; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LSPIJUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LSPCompletableFuture.java b/src/main/java/com/redhat/devtools/lsp4ij/client/LSPCompletableFuture.java similarity index 89% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LSPCompletableFuture.java rename to src/main/java/com/redhat/devtools/lsp4ij/client/LSPCompletableFuture.java index fc27c091f..47da79d8a 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LSPCompletableFuture.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/client/LSPCompletableFuture.java @@ -11,10 +11,10 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.client; +package com.redhat.devtools.lsp4ij.client; import com.intellij.openapi.progress.ProgressIndicator; -import com.redhat.devtools.intellij.lsp4ij.internal.PromiseToCompletableFuture; +import com.redhat.devtools.lsp4ij.internal.PromiseToCompletableFuture; import java.util.function.Function; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LSPProgressIndicator.java b/src/main/java/com/redhat/devtools/lsp4ij/client/LSPProgressIndicator.java similarity index 88% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LSPProgressIndicator.java rename to src/main/java/com/redhat/devtools/lsp4ij/client/LSPProgressIndicator.java index 6fbb19a8c..cae61e815 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LSPProgressIndicator.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/client/LSPProgressIndicator.java @@ -11,11 +11,10 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.client; +package com.redhat.devtools.lsp4ij.client; import com.intellij.openapi.progress.StandardProgressIndicator; import com.intellij.openapi.progress.util.AbstractProgressIndicatorBase; -import com.redhat.devtools.intellij.lsp4ij.client.LanguageClientImpl; /** * LSP progress indicator which check that language client is not stopped. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LanguageClientImpl.java b/src/main/java/com/redhat/devtools/lsp4ij/client/LanguageClientImpl.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LanguageClientImpl.java rename to src/main/java/com/redhat/devtools/lsp4ij/client/LanguageClientImpl.java index 347200fcb..779a4f418 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/client/LanguageClientImpl.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/client/LanguageClientImpl.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.client; +package com.redhat.devtools.lsp4ij.client; import com.intellij.openapi.Disposable; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Disposer; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; -import com.redhat.devtools.intellij.lsp4ij.ServerMessageHandler; -import com.redhat.devtools.intellij.lsp4ij.operations.diagnostics.LSPDiagnosticHandler; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.ServerMessageHandler; +import com.redhat.devtools.lsp4ij.operations.diagnostics.LSPDiagnosticHandler; import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.services.LanguageClient; import org.eclipse.lsp4j.services.LanguageServer; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/commands/CommandExecutor.java b/src/main/java/com/redhat/devtools/lsp4ij/commands/CommandExecutor.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/commands/CommandExecutor.java rename to src/main/java/com/redhat/devtools/lsp4ij/commands/CommandExecutor.java index a3af90953..e9ece29da 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/commands/CommandExecutor.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/commands/CommandExecutor.java @@ -9,7 +9,7 @@ * Red Hat, Inc. - initial API and implementation * Fraunhofer FOKUS ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.commands; +package com.redhat.devtools.lsp4ij.commands; import com.google.gson.Gson; import com.google.gson.JsonArray; @@ -23,9 +23,9 @@ import com.intellij.openapi.editor.Document; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; import org.eclipse.lsp4j.Command; import org.eclipse.lsp4j.ExecuteCommandOptions; import org.eclipse.lsp4j.ExecuteCommandParams; @@ -51,9 +51,9 @@ public class CommandExecutor { private static final Logger LOGGER = LoggerFactory.getLogger(CommandExecutor.class); - public static final DataKey LSP_COMMAND = DataKey.create("com.redhat.devtools.intellij.lsp4ij.command"); + public static final DataKey LSP_COMMAND = DataKey.create("com.redhat.devtools.lsp4ij.command"); - public static final DataKey LSP_COMMAND_DOCUMENT_URI = DataKey.create("com.redhat.devtools.intellij.lsp4ij.command.documentUri"); + public static final DataKey LSP_COMMAND_DOCUMENT_URI = DataKey.create("com.redhat.devtools.lsp4ij.command.documentUri"); /** * Will execute the given {@code command} either on a language server, diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleToolWindowFactory.java b/src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleToolWindowFactory.java similarity index 91% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleToolWindowFactory.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleToolWindowFactory.java index 214855e13..e997b0019 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleToolWindowFactory.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleToolWindowFactory.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console; +package com.redhat.devtools.lsp4ij.console; import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; @@ -19,7 +19,7 @@ import com.intellij.openapi.wm.ToolWindowFactory; import com.intellij.ui.content.Content; import com.intellij.ui.content.ContentManager; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; +import com.redhat.devtools.lsp4ij.LanguageServerBundle; import org.jetbrains.annotations.NotNull; /** diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleToolWindowPanel.java b/src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleToolWindowPanel.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleToolWindowPanel.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleToolWindowPanel.java index ee0ed51f3..f34d4831e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleToolWindowPanel.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleToolWindowPanel.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console; +package com.redhat.devtools.lsp4ij.console; import com.intellij.execution.ui.ConsoleView; import com.intellij.execution.ui.ConsoleViewContentType; @@ -30,13 +30,13 @@ import com.intellij.util.ui.FormBuilder; import com.intellij.util.ui.JBUI; import com.intellij.util.ui.UI; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.LanguageServerExplorer; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.LanguageServerProcessTreeNode; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.LanguageServerTreeNode; -import com.redhat.devtools.intellij.lsp4ij.settings.ServerTrace; -import com.redhat.devtools.intellij.lsp4ij.settings.UserDefinedLanguageServerSettings; +import com.redhat.devtools.lsp4ij.LanguageServerBundle; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; +import com.redhat.devtools.lsp4ij.console.explorer.LanguageServerExplorer; +import com.redhat.devtools.lsp4ij.console.explorer.LanguageServerProcessTreeNode; +import com.redhat.devtools.lsp4ij.console.explorer.LanguageServerTreeNode; +import com.redhat.devtools.lsp4ij.settings.ServerTrace; +import com.redhat.devtools.lsp4ij.settings.UserDefinedLanguageServerSettings; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleView.java b/src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleView.java similarity index 85% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleView.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleView.java index c70194714..e75158f19 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPConsoleView.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/LSPConsoleView.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console; +package com.redhat.devtools.lsp4ij.console; import com.intellij.execution.impl.ConsoleViewImpl; import com.intellij.execution.impl.EditorHyperlinkSupport; @@ -20,19 +20,16 @@ import com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction; import com.intellij.openapi.project.Project; import com.intellij.psi.search.GlobalSearchScope; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; -import com.redhat.devtools.intellij.lsp4ij.console.actions.AutoFoldingAction; -import com.redhat.devtools.intellij.lsp4ij.console.actions.ClearThisConsoleAction; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.LanguageServerProcessTreeNode; -import com.redhat.devtools.intellij.lsp4ij.settings.ServerTrace; -import com.redhat.devtools.intellij.lsp4ij.settings.UserDefinedLanguageServerSettings; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; +import com.redhat.devtools.lsp4ij.console.actions.AutoFoldingAction; +import com.redhat.devtools.lsp4ij.console.actions.ClearThisConsoleAction; +import com.redhat.devtools.lsp4ij.settings.ServerTrace; +import com.redhat.devtools.lsp4ij.settings.UserDefinedLanguageServerSettings; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; -import static com.redhat.devtools.intellij.lsp4ij.console.actions.AutoFoldingAction.shouldLSPTracesBeExpanded; - /** * Extends {@link ConsoleViewImpl} to support custom LSP folding by using [Trace */ @@ -72,7 +69,7 @@ protected void updateFoldings(int startLine, int endLine) { int foldingStartOffset = -1; String foldingPaceholder = null; int lineNumber = 0; - boolean expanded = shouldLSPTracesBeExpanded(editor); + boolean expanded = AutoFoldingAction.shouldLSPTracesBeExpanded(editor); for (int line = startLine; line <= endLine; line++) { var lineText = EditorHyperlinkSupport.getLineText(document, line, false); if (lineText.startsWith("[Trace")) { diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPTextConsoleBuilderImpl.java b/src/main/java/com/redhat/devtools/lsp4ij/console/LSPTextConsoleBuilderImpl.java similarity index 80% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPTextConsoleBuilderImpl.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/LSPTextConsoleBuilderImpl.java index b5460ffa7..b5236da36 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/LSPTextConsoleBuilderImpl.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/LSPTextConsoleBuilderImpl.java @@ -11,15 +11,12 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console; +package com.redhat.devtools.lsp4ij.console; import com.intellij.execution.filters.TextConsoleBuilderImpl; -import com.intellij.execution.impl.ConsoleViewImpl; import com.intellij.execution.ui.ConsoleView; import com.intellij.openapi.project.Project; -import com.intellij.psi.search.GlobalSearchScope; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.LanguageServerProcessTreeNode; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; import org.jetbrains.annotations.NotNull; /** diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/SimpleCardLayoutPanel.java b/src/main/java/com/redhat/devtools/lsp4ij/console/SimpleCardLayoutPanel.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/SimpleCardLayoutPanel.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/SimpleCardLayoutPanel.java index 883bc258d..2904bc9e1 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/SimpleCardLayoutPanel.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/SimpleCardLayoutPanel.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console; +package com.redhat.devtools.lsp4ij.console; import com.intellij.openapi.Disposable; import com.intellij.util.ui.JBInsets; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/actions/AutoFoldingAction.java b/src/main/java/com/redhat/devtools/lsp4ij/console/actions/AutoFoldingAction.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/actions/AutoFoldingAction.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/actions/AutoFoldingAction.java index 4267fc1e8..fbe5e2e8d 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/actions/AutoFoldingAction.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/actions/AutoFoldingAction.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.actions; +package com.redhat.devtools.lsp4ij.console.actions; import com.intellij.icons.AllIcons; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -19,7 +19,7 @@ import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.FoldRegion; import com.intellij.openapi.project.DumbAware; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; +import com.redhat.devtools.lsp4ij.LanguageServerBundle; import org.jetbrains.annotations.NotNull; /** diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/actions/ClearThisConsoleAction.java b/src/main/java/com/redhat/devtools/lsp4ij/console/actions/ClearThisConsoleAction.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/actions/ClearThisConsoleAction.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/actions/ClearThisConsoleAction.java index 7740c90e2..5fec5e6df 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/actions/ClearThisConsoleAction.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/actions/ClearThisConsoleAction.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.actions; +package com.redhat.devtools.lsp4ij.console.actions; import com.intellij.execution.actions.ClearConsoleAction; import com.intellij.execution.ui.ConsoleView; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerExplorer.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerExplorer.java similarity index 89% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerExplorer.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerExplorer.java index ee540648a..898936d0e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerExplorer.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerExplorer.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer; +package com.redhat.devtools.lsp4ij.console.explorer; import com.intellij.openapi.Disposable; import com.intellij.openapi.actionSystem.*; @@ -20,14 +20,14 @@ import com.intellij.ui.AnimatedIcon; import com.intellij.ui.PopupHandler; import com.intellij.ui.treeStructure.Tree; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.console.LSPConsoleToolWindowPanel; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.actions.CopyStartServerCommandAction; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.actions.RestartServerAction; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.actions.PauseServerAction; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.actions.StopServerAction; -import com.redhat.devtools.intellij.lsp4ij.lifecycle.LanguageServerLifecycleManager; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.console.LSPConsoleToolWindowPanel; +import com.redhat.devtools.lsp4ij.console.explorer.actions.CopyStartServerCommandAction; +import com.redhat.devtools.lsp4ij.console.explorer.actions.RestartServerAction; +import com.redhat.devtools.lsp4ij.console.explorer.actions.PauseServerAction; +import com.redhat.devtools.lsp4ij.console.explorer.actions.StopServerAction; +import com.redhat.devtools.lsp4ij.lifecycle.LanguageServerLifecycleManager; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerExplorerLifecycleListener.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerExplorerLifecycleListener.java similarity index 91% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerExplorerLifecycleListener.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerExplorerLifecycleListener.java index c507a57bc..405e73a4e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerExplorerLifecycleListener.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerExplorerLifecycleListener.java @@ -11,15 +11,15 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer; +package com.redhat.devtools.lsp4ij.console.explorer; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.project.Project; -import com.redhat.devtools.intellij.lsp4ij.ServerStatus; -import com.redhat.devtools.intellij.lsp4ij.settings.ServerTrace; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; -import com.redhat.devtools.intellij.lsp4ij.lifecycle.LanguageServerLifecycleListener; -import com.redhat.devtools.intellij.lsp4ij.settings.UserDefinedLanguageServerSettings; +import com.redhat.devtools.lsp4ij.ServerStatus; +import com.redhat.devtools.lsp4ij.settings.ServerTrace; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.lifecycle.LanguageServerLifecycleListener; +import com.redhat.devtools.lsp4ij.settings.UserDefinedLanguageServerSettings; import org.eclipse.lsp4j.jsonrpc.MessageConsumer; import org.eclipse.lsp4j.jsonrpc.messages.Message; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerProcessTreeNode.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerProcessTreeNode.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerProcessTreeNode.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerProcessTreeNode.java index fc9950460..7771c7f8a 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerProcessTreeNode.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerProcessTreeNode.java @@ -11,13 +11,13 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer; +package com.redhat.devtools.lsp4ij.console.explorer; import com.intellij.icons.AllIcons; import com.intellij.openapi.util.text.Formats; import com.intellij.ui.AnimatedIcon; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; -import com.redhat.devtools.intellij.lsp4ij.ServerStatus; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.ServerStatus; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerTreeNode.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerTreeNode.java similarity index 90% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerTreeNode.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerTreeNode.java index ff49fff37..86f96453f 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerTreeNode.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerTreeNode.java @@ -11,9 +11,9 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer; +package com.redhat.devtools.lsp4ij.console.explorer; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerTreeRenderer.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerTreeRenderer.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerTreeRenderer.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerTreeRenderer.java index 4b3c31a06..2fe647cc3 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/LanguageServerTreeRenderer.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/LanguageServerTreeRenderer.java @@ -11,14 +11,14 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer; +package com.redhat.devtools.lsp4ij.console.explorer; import com.intellij.ide.ui.UISettings; import com.intellij.ui.ColoredTreeCellRenderer; import com.intellij.ui.RelativeFont; import com.intellij.ui.SimpleTextAttributes; import com.intellij.util.ui.UIUtil; -import com.redhat.devtools.intellij.lsp4ij.ServerStatus; +import com.redhat.devtools.lsp4ij.ServerStatus; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/TracingMessageConsumer.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/TracingMessageConsumer.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/TracingMessageConsumer.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/TracingMessageConsumer.java index e1bb121da..8ed9973ef 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/TracingMessageConsumer.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/TracingMessageConsumer.java @@ -9,9 +9,9 @@ * * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer; +package com.redhat.devtools.lsp4ij.console.explorer; -import com.redhat.devtools.intellij.lsp4ij.settings.ServerTrace; +import com.redhat.devtools.lsp4ij.settings.ServerTrace; import org.eclipse.lsp4j.jsonrpc.JsonRpcException; import org.eclipse.lsp4j.jsonrpc.MessageConsumer; import org.eclipse.lsp4j.jsonrpc.MessageIssueException; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/CopyStartServerCommandAction.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/CopyStartServerCommandAction.java similarity index 89% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/CopyStartServerCommandAction.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/CopyStartServerCommandAction.java index 95479dd4a..1becb6adb 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/CopyStartServerCommandAction.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/CopyStartServerCommandAction.java @@ -11,13 +11,12 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer.actions; +package com.redhat.devtools.lsp4ij.console.explorer.actions; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAware; import com.intellij.ui.treeStructure.Tree; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import org.jetbrains.annotations.NotNull; import java.awt.*; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/PauseServerAction.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/PauseServerAction.java similarity index 84% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/PauseServerAction.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/PauseServerAction.java index d4688c60c..0fb963be2 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/PauseServerAction.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/PauseServerAction.java @@ -11,13 +11,12 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer.actions; +package com.redhat.devtools.lsp4ij.console.explorer.actions; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAware; import com.intellij.ui.treeStructure.Tree; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import org.jetbrains.annotations.NotNull; /** diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/RestartServerAction.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/RestartServerAction.java similarity index 80% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/RestartServerAction.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/RestartServerAction.java index db198e007..65444ac4a 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/RestartServerAction.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/RestartServerAction.java @@ -11,18 +11,13 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer.actions; +package com.redhat.devtools.lsp4ij.console.explorer.actions; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAware; import com.intellij.ui.treeStructure.Tree; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; /** * Action to restart the selected language server process from the language explorer. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/StopServerAction.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/StopServerAction.java similarity index 84% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/StopServerAction.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/StopServerAction.java index 114aca98f..c1d2240b6 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/StopServerAction.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/StopServerAction.java @@ -11,13 +11,12 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer.actions; +package com.redhat.devtools.lsp4ij.console.explorer.actions; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAware; import com.intellij.ui.treeStructure.Tree; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import org.jetbrains.annotations.NotNull; /** diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/TreeAction.java b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/TreeAction.java similarity index 85% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/TreeAction.java rename to src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/TreeAction.java index dfdfe9b82..ceb411130 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/console/explorer/actions/TreeAction.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/console/explorer/actions/TreeAction.java @@ -11,17 +11,15 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.console.explorer.actions; +package com.redhat.devtools.lsp4ij.console.explorer.actions; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.PlatformDataKeys; -import com.intellij.openapi.util.NlsActions; import com.intellij.ui.treeStructure.Tree; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; -import com.redhat.devtools.intellij.lsp4ij.console.explorer.LanguageServerProcessTreeNode; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.console.explorer.LanguageServerProcessTreeNode; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import javax.swing.tree.TreePath; import java.awt.*; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/inspections/AbstractDelegateInspection.java b/src/main/java/com/redhat/devtools/lsp4ij/inspections/AbstractDelegateInspection.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/inspections/AbstractDelegateInspection.java rename to src/main/java/com/redhat/devtools/lsp4ij/inspections/AbstractDelegateInspection.java index daca8791a..d4df0f9e2 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/inspections/AbstractDelegateInspection.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/inspections/AbstractDelegateInspection.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.inspections; +package com.redhat.devtools.lsp4ij.inspections; import com.intellij.codeInspection.LocalInspectionTool; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/inspections/AbstractDelegateInspectionWithExclusions.java b/src/main/java/com/redhat/devtools/lsp4ij/inspections/AbstractDelegateInspectionWithExclusions.java similarity index 97% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/inspections/AbstractDelegateInspectionWithExclusions.java rename to src/main/java/com/redhat/devtools/lsp4ij/inspections/AbstractDelegateInspectionWithExclusions.java index a2bc0357d..6b5e60ede 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/inspections/AbstractDelegateInspectionWithExclusions.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/inspections/AbstractDelegateInspectionWithExclusions.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.inspections; +package com.redhat.devtools.lsp4ij.inspections; import com.intellij.codeInspection.LocalInspectionTool; import com.intellij.codeInspection.ui.InspectionOptionsPanel; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/CancellationSupport.java b/src/main/java/com/redhat/devtools/lsp4ij/internal/CancellationSupport.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/CancellationSupport.java rename to src/main/java/com/redhat/devtools/lsp4ij/internal/CancellationSupport.java index e97f81ce2..4768c08f7 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/CancellationSupport.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/internal/CancellationSupport.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.internal; +package com.redhat.devtools.lsp4ij.internal; import java.util.List; import java.util.concurrent.CancellationException; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/CancellationUtil.java b/src/main/java/com/redhat/devtools/lsp4ij/internal/CancellationUtil.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/CancellationUtil.java rename to src/main/java/com/redhat/devtools/lsp4ij/internal/CancellationUtil.java index 7caa62ca3..3590f52ae 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/CancellationUtil.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/internal/CancellationUtil.java @@ -9,7 +9,7 @@ * Contributors: * Rubén Porras Campo (Avaloq Group AG) - Initial Implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.internal; +package com.redhat.devtools.lsp4ij.internal; import java.util.concurrent.CancellationException; import java.util.concurrent.CompletionException; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/PromiseToCompletableFuture.java b/src/main/java/com/redhat/devtools/lsp4ij/internal/PromiseToCompletableFuture.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/PromiseToCompletableFuture.java rename to src/main/java/com/redhat/devtools/lsp4ij/internal/PromiseToCompletableFuture.java index 4173bc391..81c00740d 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/PromiseToCompletableFuture.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/internal/PromiseToCompletableFuture.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.internal; +package com.redhat.devtools.lsp4ij.internal; import com.intellij.ide.lightEdit.LightEdit; import com.intellij.openapi.Disposable; @@ -20,7 +20,7 @@ import com.intellij.openapi.project.IndexNotReadyException; import com.intellij.openapi.project.Project; import com.intellij.util.concurrency.AppExecutorUtil; -import com.redhat.devtools.intellij.lsp4ij.client.ExecutionAttemptLimitReachedException; +import com.redhat.devtools.lsp4ij.client.ExecutionAttemptLimitReachedException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.concurrency.CancellablePromise; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/StringUtils.java b/src/main/java/com/redhat/devtools/lsp4ij/internal/StringUtils.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/StringUtils.java rename to src/main/java/com/redhat/devtools/lsp4ij/internal/StringUtils.java index d6084baae..e5d130549 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/StringUtils.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/internal/StringUtils.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.internal; +package com.redhat.devtools.lsp4ij.internal; public class StringUtils { diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/SupportedFeatures.java b/src/main/java/com/redhat/devtools/lsp4ij/internal/SupportedFeatures.java similarity index 97% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/SupportedFeatures.java rename to src/main/java/com/redhat/devtools/lsp4ij/internal/SupportedFeatures.java index b6815a315..e30262ce6 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/SupportedFeatures.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/internal/SupportedFeatures.java @@ -10,7 +10,7 @@ * Ahmed Hussain (Cocotec Ltd) - initial implementation * *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.internal; +package com.redhat.devtools.lsp4ij.internal; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/LanguageServerLifecycleListener.java b/src/main/java/com/redhat/devtools/lsp4ij/lifecycle/LanguageServerLifecycleListener.java similarity index 87% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/LanguageServerLifecycleListener.java rename to src/main/java/com/redhat/devtools/lsp4ij/lifecycle/LanguageServerLifecycleListener.java index 8f23a1f7d..fcb040eee 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/LanguageServerLifecycleListener.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/lifecycle/LanguageServerLifecycleListener.java @@ -11,9 +11,9 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.lifecycle; +package com.redhat.devtools.lsp4ij.lifecycle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import org.eclipse.lsp4j.jsonrpc.MessageConsumer; import org.eclipse.lsp4j.jsonrpc.messages.Message; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/LanguageServerLifecycleManager.java b/src/main/java/com/redhat/devtools/lsp4ij/lifecycle/LanguageServerLifecycleManager.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/LanguageServerLifecycleManager.java rename to src/main/java/com/redhat/devtools/lsp4ij/lifecycle/LanguageServerLifecycleManager.java index f70871167..b776bce73 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/LanguageServerLifecycleManager.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/lifecycle/LanguageServerLifecycleManager.java @@ -11,10 +11,10 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.lifecycle; +package com.redhat.devtools.lsp4ij.lifecycle; import com.intellij.openapi.project.Project; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import org.eclipse.lsp4j.jsonrpc.MessageConsumer; import org.eclipse.lsp4j.jsonrpc.messages.Message; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/NullLanguageServerLifecycleManager.java b/src/main/java/com/redhat/devtools/lsp4ij/lifecycle/NullLanguageServerLifecycleManager.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/NullLanguageServerLifecycleManager.java rename to src/main/java/com/redhat/devtools/lsp4ij/lifecycle/NullLanguageServerLifecycleManager.java index ffac57ad2..b32d9bb69 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/lifecycle/NullLanguageServerLifecycleManager.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/lifecycle/NullLanguageServerLifecycleManager.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.lifecycle; +package com.redhat.devtools.lsp4ij.lifecycle; import java.util.Collections; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codeactions/LSPLazyCodeActionIntentionAction.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/codeactions/LSPLazyCodeActionIntentionAction.java similarity index 91% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codeactions/LSPLazyCodeActionIntentionAction.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/codeactions/LSPLazyCodeActionIntentionAction.java index 2a5ea6c5a..40e98298e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codeactions/LSPLazyCodeActionIntentionAction.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/codeactions/LSPLazyCodeActionIntentionAction.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.codeactions; +package com.redhat.devtools.lsp4ij.operations.codeactions; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.codeInspection.util.IntentionFamilyName; @@ -22,10 +22,10 @@ import com.intellij.psi.PsiFile; import com.intellij.util.DocumentUtil; import com.intellij.util.IncorrectOperationException; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; -import com.redhat.devtools.intellij.lsp4ij.commands.CommandExecutor; -import com.redhat.devtools.intellij.lsp4ij.internal.StringUtils; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.commands.CommandExecutor; +import com.redhat.devtools.lsp4ij.internal.StringUtils; import org.eclipse.lsp4j.CodeAction; import org.eclipse.lsp4j.CodeActionOptions; import org.eclipse.lsp4j.Command; @@ -33,7 +33,7 @@ import org.eclipse.lsp4j.jsonrpc.messages.Either; import org.jetbrains.annotations.NotNull; -import static com.redhat.devtools.intellij.lsp4ij.operations.codeactions.LSPLazyCodeActions.NO_CODEACTION_AT_INDEX; +import static com.redhat.devtools.lsp4ij.operations.codeactions.LSPLazyCodeActions.NO_CODEACTION_AT_INDEX; /** * The lazy IJ Quick fix. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codeactions/LSPLazyCodeActions.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/codeactions/LSPLazyCodeActions.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codeactions/LSPLazyCodeActions.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/codeactions/LSPLazyCodeActions.java index 678440730..47d742a13 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codeactions/LSPLazyCodeActions.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/codeactions/LSPLazyCodeActions.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.codeactions; +package com.redhat.devtools.lsp4ij.operations.codeactions; import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; import com.intellij.codeInsight.intention.IntentionAction; @@ -20,9 +20,9 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; -import com.redhat.devtools.intellij.lsp4ij.CompletableFutures; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.CompletableFutures; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.jsonrpc.messages.Either; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codelens/LSPCodelensInlayProvider.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/codelens/LSPCodelensInlayProvider.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codelens/LSPCodelensInlayProvider.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/codelens/LSPCodelensInlayProvider.java index f503602e4..79a733056 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/codelens/LSPCodelensInlayProvider.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/codelens/LSPCodelensInlayProvider.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.codelens; +package com.redhat.devtools.lsp4ij.operations.codelens; import com.intellij.codeInsight.hints.InlayHintsSink; import com.intellij.codeInsight.hints.presentation.InlayPresentation; @@ -21,10 +21,10 @@ import com.intellij.openapi.util.Key; import com.intellij.openapi.util.Pair; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.AbstractLSPInlayProvider; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationSupport; +import com.redhat.devtools.lsp4ij.AbstractLSPInlayProvider; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.internal.CancellationSupport; import org.eclipse.lsp4j.CodeLens; import org.eclipse.lsp4j.CodeLensParams; import org.eclipse.lsp4j.Command; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/CompletionPrefix.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/CompletionPrefix.java similarity index 89% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/CompletionPrefix.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/CompletionPrefix.java index 50016260f..217b50afe 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/CompletionPrefix.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/CompletionPrefix.java @@ -11,11 +11,11 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion; +package com.redhat.devtools.lsp4ij.operations.completion; import com.intellij.openapi.editor.Document; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.internal.StringUtils; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.internal.StringUtils; import org.eclipse.lsp4j.CompletionItem; import org.eclipse.lsp4j.Position; import org.eclipse.lsp4j.Range; @@ -25,8 +25,6 @@ import java.util.HashMap; import java.util.Map; -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.CompletionProposalTools.getCompletionPrefix; - /** * Completion prefix provides the capability to compute the prefix where the completion has been triggered and by using the LSP {@link org.eclipse.lsp4j.TextEdit} information. *

@@ -68,7 +66,7 @@ public Document getDocument() { if (prefix == null && !prefixCache.containsKey(textEditRange)) { // Compute the prefix which can be null // ex : {#ea|ch will return {#ea - prefix = getCompletionPrefix(completionPos, textEditRange, document); + prefix = CompletionProposalTools.getCompletionPrefix(completionPos, textEditRange, document); prefixCache.put(textEditRange, prefix); } if (prefix == null) { diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/CompletionProposalTools.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/CompletionProposalTools.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/CompletionProposalTools.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/CompletionProposalTools.java index c3a4ba458..7922d3cbe 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/CompletionProposalTools.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/CompletionProposalTools.java @@ -9,7 +9,7 @@ * Contributors: * Lucas Bullen (Red Hat Inc.) - initial implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion; +package com.redhat.devtools.lsp4ij.operations.completion; import com.intellij.lang.Language; import com.intellij.openapi.editor.Document; @@ -20,7 +20,7 @@ import com.intellij.psi.codeStyle.CommonCodeStyleSettings; import com.intellij.psi.impl.PsiManagerEx; import com.intellij.psi.templateLanguages.TemplateLanguageFileViewProvider; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; import org.eclipse.lsp4j.Position; import org.eclipse.lsp4j.Range; import org.eclipse.lsp4j.util.Ranges; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionConfidence.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionConfidence.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionConfidence.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionConfidence.java index 01ce243b4..9e54a47c2 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionConfidence.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionConfidence.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion; +package com.redhat.devtools.lsp4ij.operations.completion; import com.intellij.codeInsight.completion.CompletionConfidence; import com.intellij.psi.PsiElement; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionContributor.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionContributor.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionContributor.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionContributor.java index b462ad97a..8c31fcd19 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionContributor.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionContributor.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion; +package com.redhat.devtools.lsp4ij.operations.completion; import com.intellij.codeInsight.completion.CompletionContributor; import com.intellij.codeInsight.completion.CompletionParameters; @@ -24,11 +24,11 @@ import com.intellij.openapi.util.Pair; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerItem; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationSupport; -import com.redhat.devtools.intellij.lsp4ij.internal.StringUtils; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServerItem; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.internal.CancellationSupport; +import com.redhat.devtools.lsp4ij.internal.StringUtils; import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.jsonrpc.messages.Either; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionProposal.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionProposal.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionProposal.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionProposal.java index fc9ea5361..e95f4b8b6 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionProposal.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/LSPCompletionProposal.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion; +package com.redhat.devtools.lsp4ij.operations.completion; import com.intellij.codeInsight.completion.CodeCompletionHandlerBase; import com.intellij.codeInsight.completion.CompletionInitializationContext; @@ -24,12 +24,12 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerItem; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.commands.CommandExecutor; -import com.redhat.devtools.intellij.lsp4ij.internal.StringUtils; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServerItem; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.commands.CommandExecutor; +import com.redhat.devtools.lsp4ij.internal.StringUtils; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.jsonrpc.messages.Either; import org.jetbrains.annotations.NotNull; @@ -44,9 +44,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.CompletionProposalTools.createLspIndentOptions; -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetVariableConstants.*; -import static com.redhat.devtools.intellij.lsp4ij.ui.IconMapper.getIcon; +import static com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetVariableConstants.*; +import static com.redhat.devtools.lsp4ij.ui.IconMapper.getIcon; /** * LSP completion lookup element. @@ -84,7 +83,7 @@ public void handleInsert(@NotNull InsertionContext context) { // Insert text has snippet syntax, ex : ${1:name} String snippetContent = getInsertText(); // Get the indentation settings - LspSnippetIndentOptions indentOptions = createLspIndentOptions(snippetContent, file); + LspSnippetIndentOptions indentOptions = CompletionProposalTools.createLspIndentOptions(snippetContent, file); // Load the insert text to build: // - an IJ Template instance which will take care of replacement of placeholders // - the insert text without placeholders diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/SnippetTemplateFactory.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/SnippetTemplateFactory.java similarity index 88% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/SnippetTemplateFactory.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/SnippetTemplateFactory.java index 55059f85c..23f6ffbc0 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/SnippetTemplateFactory.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/SnippetTemplateFactory.java @@ -11,13 +11,13 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion; +package com.redhat.devtools.lsp4ij.operations.completion; import com.intellij.codeInsight.template.Template; import com.intellij.codeInsight.template.TemplateManager; import com.intellij.openapi.project.Project; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetParser; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetParser; import org.jetbrains.annotations.NotNull; import java.util.function.Function; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/SnippetTemplateLoader.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/SnippetTemplateLoader.java similarity index 89% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/SnippetTemplateLoader.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/SnippetTemplateLoader.java index 00da14871..8f2e43cd5 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/SnippetTemplateLoader.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/SnippetTemplateLoader.java @@ -11,13 +11,13 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion; +package com.redhat.devtools.lsp4ij.operations.completion; import com.intellij.codeInsight.template.Template; import com.intellij.codeInsight.template.impl.ConstantNode; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.AbstractLspSnippetHandler; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetHandler; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.AbstractLspSnippetHandler; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetHandler; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/AbstractLspSnippetHandler.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/AbstractLspSnippetHandler.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/AbstractLspSnippetHandler.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/AbstractLspSnippetHandler.java index b1be57d5d..172c6f05c 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/AbstractLspSnippetHandler.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/AbstractLspSnippetHandler.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; import java.util.function.Function; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/DefaultLspSnippetHandler.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/DefaultLspSnippetHandler.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/DefaultLspSnippetHandler.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/DefaultLspSnippetHandler.java index 0c23723da..478d9131d 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/DefaultLspSnippetHandler.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/DefaultLspSnippetHandler.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; import java.util.List; import java.util.function.Function; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/Location.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/Location.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/Location.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/Location.java index 0d0707c2b..dc4e4ee1a 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/Location.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/Location.java @@ -19,7 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; /** diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetHandler.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetHandler.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetHandler.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetHandler.java index 6f07b8f88..50fd7681d 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetHandler.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetHandler.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; import java.util.List; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetIndentOptions.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetIndentOptions.java similarity index 95% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetIndentOptions.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetIndentOptions.java index 735950a3a..313f935dd 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetIndentOptions.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetIndentOptions.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; /** * LSP snippet indent options used to replace LSP snippet content '\n' and '\t: diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetParser.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetParser.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetParser.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetParser.java index 41437d5fc..628b16aee 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetParser.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetParser.java @@ -19,7 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; import java.io.IOException; import java.io.Reader; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetVariableConstants.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetVariableConstants.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetVariableConstants.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetVariableConstants.java index 83240593b..fbff78012 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetVariableConstants.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetVariableConstants.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; /** * LSP variables. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ParseException.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ParseException.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ParseException.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ParseException.java index bfec14290..bc93650e8 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ParseException.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ParseException.java @@ -19,7 +19,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; /** * An unchecked exception to indicate that an input does not qualify as valid JSON. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticAnnotator.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticAnnotator.java similarity index 85% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticAnnotator.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticAnnotator.java index 4692c18d7..09fd1ab27 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticAnnotator.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticAnnotator.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.diagnostics; +package com.redhat.devtools.lsp4ij.operations.diagnostics; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.lang.annotation.AnnotationBuilder; @@ -23,10 +23,10 @@ import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LSPVirtualFileData; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.operations.codeactions.LSPLazyCodeActionIntentionAction; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LSPVirtualFileData; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.operations.codeactions.LSPLazyCodeActionIntentionAction; import org.eclipse.lsp4j.Diagnostic; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -34,8 +34,6 @@ import java.net.URI; import java.util.List; -import static com.redhat.devtools.intellij.lsp4ij.operations.diagnostics.SeverityMapping.toHighlightSeverity; - /** * Intellij {@link ExternalAnnotator} implementation which get the current LSP diagnostics for a given file and translate * them into Intellij {@link com.intellij.lang.annotation.Annotation}. @@ -82,7 +80,7 @@ private static void createAnnotation(Diagnostic diagnostic, Document document, L return; } // Collect information required to create Intellij Annotations - HighlightSeverity severity = toHighlightSeverity(diagnostic.getSeverity()); + HighlightSeverity severity = SeverityMapping.toHighlightSeverity(diagnostic.getSeverity()); String message = diagnostic.getMessage(); // Create Intellij Annotation from the given LSP diagnostic diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticHandler.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticHandler.java similarity index 90% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticHandler.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticHandler.java index 2736de86f..5b7efcbe0 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticHandler.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticHandler.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.diagnostics; +package com.redhat.devtools.lsp4ij.operations.diagnostics; import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; import com.intellij.openapi.application.ApplicationManager; @@ -22,10 +22,10 @@ import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; import com.intellij.util.concurrency.AppExecutorUtil; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LSPVirtualFileData; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; -import com.redhat.devtools.intellij.lsp4ij.client.CoalesceByKey; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LSPVirtualFileData; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.client.CoalesceByKey; import org.eclipse.lsp4j.PublishDiagnosticsParams; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticsForServer.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticsForServer.java similarity index 89% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticsForServer.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticsForServer.java index 24231231e..99c384424 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPDiagnosticsForServer.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPDiagnosticsForServer.java @@ -11,13 +11,13 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.diagnostics; +package com.redhat.devtools.lsp4ij.operations.diagnostics; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; -import com.redhat.devtools.intellij.lsp4ij.operations.codeactions.LSPLazyCodeActionIntentionAction; -import com.redhat.devtools.intellij.lsp4ij.operations.codeactions.LSPLazyCodeActions; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.operations.codeactions.LSPLazyCodeActionIntentionAction; +import com.redhat.devtools.lsp4ij.operations.codeactions.LSPLazyCodeActions; import org.eclipse.lsp4j.Diagnostic; import org.eclipse.lsp4j.ServerCapabilities; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPPSiElement.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPPSiElement.java similarity index 99% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPPSiElement.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPPSiElement.java index 5405d832c..3f90ef204 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPPSiElement.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPPSiElement.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.diagnostics; +package com.redhat.devtools.lsp4ij.operations.diagnostics; import com.intellij.lang.ASTNode; import com.intellij.lang.Language; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPPsiReference.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPPsiReference.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPPsiReference.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPPsiReference.java index 92d4c7e04..32c3ba8a0 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/LSPPsiReference.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/LSPPsiReference.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.diagnostics; +package com.redhat.devtools.lsp4ij.operations.diagnostics; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/SeverityMapping.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/SeverityMapping.java similarity index 98% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/SeverityMapping.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/SeverityMapping.java index ab1a74d90..eb4163877 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/diagnostics/SeverityMapping.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/SeverityMapping.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.diagnostics; +package com.redhat.devtools.lsp4ij.operations.diagnostics; import com.intellij.codeHighlighting.HighlightDisplayLevel; import com.intellij.codeInsight.daemon.HighlightDisplayKey; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkAnnotator.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkAnnotator.java similarity index 91% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkAnnotator.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkAnnotator.java index 1fdfe5553..9cc9f8a88 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkAnnotator.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkAnnotator.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.documentLink; +package com.redhat.devtools.lsp4ij.operations.documentLink; import com.intellij.codeInsight.daemon.impl.HighlightInfoType; import com.intellij.lang.annotation.AnnotationHolder; @@ -26,11 +26,11 @@ import com.intellij.openapi.util.TextRange; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LSPVirtualFileData; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationSupport; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LSPVirtualFileData; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.internal.CancellationSupport; import org.eclipse.lsp4j.DocumentLink; import org.eclipse.lsp4j.DocumentLinkParams; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkForServer.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkForServer.java similarity index 88% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkForServer.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkForServer.java index 161cb3d36..1eeb7051d 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkForServer.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkForServer.java @@ -11,10 +11,10 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.documentLink; +package com.redhat.devtools.lsp4ij.operations.documentLink; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper; +import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import org.eclipse.lsp4j.DocumentLink; import java.util.Collections; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkGotoDeclarationHandler.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkGotoDeclarationHandler.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkGotoDeclarationHandler.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkGotoDeclarationHandler.java index 6960acfa4..e58109d95 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentLink/LSPDocumentLinkGotoDeclarationHandler.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentLink/LSPDocumentLinkGotoDeclarationHandler.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.documentLink; +package com.redhat.devtools.lsp4ij.operations.documentLink; import com.intellij.codeInsight.navigation.actions.GotoDeclarationHandler; import com.intellij.openapi.application.ApplicationManager; @@ -24,10 +24,10 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiManager; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LSPVirtualFileData; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LSPVirtualFileData; +import com.redhat.devtools.lsp4ij.LanguageServerBundle; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; import org.eclipse.lsp4j.DocumentLink; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPDocumentationProvider.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPDocumentationProvider.java similarity index 97% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPDocumentationProvider.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPDocumentationProvider.java index 6540f7ab3..47d558ac6 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPDocumentationProvider.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPDocumentationProvider.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.documentation; +package com.redhat.devtools.lsp4ij.operations.documentation; import com.intellij.lang.documentation.DocumentationProviderEx; import com.intellij.lang.documentation.ExternalDocumentationHandler; @@ -21,8 +21,8 @@ import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; import com.intellij.util.io.URLUtil; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.LSPCompletionProposal; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.operations.completion.LSPCompletionProposal; import com.vladsch.flexmark.html.HtmlRenderer; import com.vladsch.flexmark.parser.Parser; import org.eclipse.lsp4j.MarkupContent; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPPsiElementForLookupItem.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPPsiElementForLookupItem.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPPsiElementForLookupItem.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPPsiElementForLookupItem.java index bcedbe908..e21b3ba8e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPPsiElementForLookupItem.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPPsiElementForLookupItem.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.documentation; +package com.redhat.devtools.lsp4ij.operations.documentation; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPTextHoverForFile.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPTextHoverForFile.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPTextHoverForFile.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPTextHoverForFile.java index 6b8b812be..eb5e9b56b 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/documentation/LSPTextHoverForFile.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/documentation/LSPTextHoverForFile.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.documentation; +package com.redhat.devtools.lsp4ij.operations.documentation; import com.intellij.openapi.Disposable; import com.intellij.openapi.editor.Document; @@ -16,13 +16,11 @@ import com.intellij.openapi.editor.impl.EditorImpl; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationSupport; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationUtil; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.internal.CancellationSupport; +import com.redhat.devtools.lsp4ij.internal.CancellationUtil; import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.jsonrpc.ResponseErrorException; import org.eclipse.lsp4j.jsonrpc.messages.Either; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightPsiElement.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightPsiElement.java similarity index 89% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightPsiElement.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightPsiElement.java index 394caf7d6..d119aa2f9 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightPsiElement.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightPsiElement.java @@ -11,17 +11,14 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.highlight; +package com.redhat.devtools.lsp4ij.operations.highlight; import com.intellij.lang.ASTNode; import com.intellij.lang.Language; -import com.intellij.openapi.editor.Document; import com.intellij.openapi.util.NlsSafe; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import com.intellij.psi.impl.PsiElementBase; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import org.eclipse.lsp4j.DocumentHighlight; import org.eclipse.lsp4j.DocumentHighlightKind; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightUsagesHandler.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightUsagesHandler.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightUsagesHandler.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightUsagesHandler.java index 14d19ceed..6eed31961 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightUsagesHandler.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightUsagesHandler.java @@ -8,18 +8,16 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.highlight; +package com.redhat.devtools.lsp4ij.operations.highlight; import com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase; import com.intellij.openapi.editor.Editor; -import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.util.Consumer; import org.eclipse.lsp4j.DocumentHighlightKind; import org.jetbrains.annotations.NotNull; import java.util.List; -import java.util.logging.Logger; public class LSPHighlightUsagesHandler extends HighlightUsagesHandlerBase { private final List targets; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightUsagesHandlerFactory.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightUsagesHandlerFactory.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightUsagesHandlerFactory.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightUsagesHandlerFactory.java index db7666550..6ef87c523 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/highlight/LSPHighlightUsagesHandlerFactory.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/highlight/LSPHighlightUsagesHandlerFactory.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.highlight; +package com.redhat.devtools.lsp4ij.operations.highlight; import com.intellij.codeInsight.TargetElementUtil; import com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase; @@ -20,9 +20,9 @@ import com.intellij.openapi.util.TextRange; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiFile; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationSupport; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.internal.CancellationSupport; import org.eclipse.lsp4j.DocumentHighlight; import org.eclipse.lsp4j.DocumentHighlightParams; import org.eclipse.lsp4j.Position; @@ -30,7 +30,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/inlayhint/LSPInlayHintInlayProvider.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/inlayhint/LSPInlayHintInlayProvider.java similarity index 96% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/inlayhint/LSPInlayHintInlayProvider.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/inlayhint/LSPInlayHintInlayProvider.java index eebdbfae3..3e1cc5dd7 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/inlayhint/LSPInlayHintInlayProvider.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/inlayhint/LSPInlayHintInlayProvider.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.inlayhint; +package com.redhat.devtools.lsp4ij.operations.inlayhint; import com.intellij.codeInsight.hints.InlayHintsSink; import com.intellij.codeInsight.hints.presentation.InlayPresentation; @@ -21,10 +21,10 @@ import com.intellij.openapi.util.Key; import com.intellij.openapi.util.Pair; import com.intellij.openapi.vfs.VirtualFile; -import com.redhat.devtools.intellij.lsp4ij.AbstractLSPInlayProvider; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationSupport; +import com.redhat.devtools.lsp4ij.AbstractLSPInlayProvider; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.internal.CancellationSupport; import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.jsonrpc.messages.Either; import org.eclipse.lsp4j.services.LanguageServer; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/navigation/LSPGotoDeclarationHandler.java b/src/main/java/com/redhat/devtools/lsp4ij/operations/navigation/LSPGotoDeclarationHandler.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/navigation/LSPGotoDeclarationHandler.java rename to src/main/java/com/redhat/devtools/lsp4ij/operations/navigation/LSPGotoDeclarationHandler.java index aada1c1a1..56021b3d3 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/navigation/LSPGotoDeclarationHandler.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/operations/navigation/LSPGotoDeclarationHandler.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.navigation; +package com.redhat.devtools.lsp4ij.operations.navigation; import com.intellij.codeInsight.navigation.actions.GotoDeclarationHandler; import com.intellij.openapi.application.ApplicationManager; @@ -21,10 +21,10 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; -import com.redhat.devtools.intellij.lsp4ij.LSPIJUtils; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationSupport; -import com.redhat.devtools.intellij.lsp4ij.internal.CancellationUtil; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.internal.CancellationSupport; +import com.redhat.devtools.lsp4ij.internal.CancellationUtil; import org.eclipse.lsp4j.DefinitionParams; import org.eclipse.lsp4j.Location; import org.eclipse.lsp4j.LocationLink; @@ -34,7 +34,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; import java.net.URI; import java.util.*; import java.util.concurrent.*; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/CannotStartProcessException.java b/src/main/java/com/redhat/devtools/lsp4ij/server/CannotStartProcessException.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/server/CannotStartProcessException.java rename to src/main/java/com/redhat/devtools/lsp4ij/server/CannotStartProcessException.java index d32adb420..a80a1c97e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/CannotStartProcessException.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/CannotStartProcessException.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.server; +package com.redhat.devtools.lsp4ij.server; import java.io.IOException; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/CannotStartServerException.java b/src/main/java/com/redhat/devtools/lsp4ij/server/CannotStartServerException.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/server/CannotStartServerException.java rename to src/main/java/com/redhat/devtools/lsp4ij/server/CannotStartServerException.java index 284f45f33..2fd44568c 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/CannotStartServerException.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/CannotStartServerException.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.server; +package com.redhat.devtools.lsp4ij.server; /** * Language server exception when language server cannot be done. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/JavaProcessCommandBuilder.java b/src/main/java/com/redhat/devtools/lsp4ij/server/JavaProcessCommandBuilder.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/server/JavaProcessCommandBuilder.java rename to src/main/java/com/redhat/devtools/lsp4ij/server/JavaProcessCommandBuilder.java index c52ea6745..b7381a7e2 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/JavaProcessCommandBuilder.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/JavaProcessCommandBuilder.java @@ -8,10 +8,10 @@ * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.server; +package com.redhat.devtools.lsp4ij.server; import com.intellij.openapi.project.Project; -import com.redhat.devtools.intellij.lsp4ij.settings.UserDefinedLanguageServerSettings; +import com.redhat.devtools.lsp4ij.settings.UserDefinedLanguageServerSettings; import java.io.File; import java.util.ArrayList; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/LanguageServerException.java b/src/main/java/com/redhat/devtools/lsp4ij/server/LanguageServerException.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/server/LanguageServerException.java rename to src/main/java/com/redhat/devtools/lsp4ij/server/LanguageServerException.java index 8ec1ca4a5..440587b8a 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/LanguageServerException.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/LanguageServerException.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.server; +package com.redhat.devtools.lsp4ij.server; /** * Base class for language server exception. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/OS.java b/src/main/java/com/redhat/devtools/lsp4ij/server/OS.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/server/OS.java rename to src/main/java/com/redhat/devtools/lsp4ij/server/OS.java index f106595cf..220a7e9f5 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/OS.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/OS.java @@ -1,4 +1,4 @@ -package com.redhat.devtools.intellij.lsp4ij.server; +package com.redhat.devtools.lsp4ij.server; import java.util.Locale; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/ProcessStreamConnectionProvider.java b/src/main/java/com/redhat/devtools/lsp4ij/server/ProcessStreamConnectionProvider.java similarity index 98% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/server/ProcessStreamConnectionProvider.java rename to src/main/java/com/redhat/devtools/lsp4ij/server/ProcessStreamConnectionProvider.java index b344fbb60..89f862965 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/ProcessStreamConnectionProvider.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/ProcessStreamConnectionProvider.java @@ -1,4 +1,4 @@ -package com.redhat.devtools.intellij.lsp4ij.server; +package com.redhat.devtools.lsp4ij.server; import javax.annotation.Nullable; import java.io.File; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/StreamConnectionProvider.java b/src/main/java/com/redhat/devtools/lsp4ij/server/StreamConnectionProvider.java similarity index 98% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/server/StreamConnectionProvider.java rename to src/main/java/com/redhat/devtools/lsp4ij/server/StreamConnectionProvider.java index c9889883c..011256732 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/server/StreamConnectionProvider.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/StreamConnectionProvider.java @@ -1,4 +1,4 @@ -package com.redhat.devtools.intellij.lsp4ij.server; +package com.redhat.devtools.lsp4ij.server; import org.eclipse.lsp4j.jsonrpc.messages.Message; import org.eclipse.lsp4j.services.LanguageServer; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerConfigurable.java b/src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerConfigurable.java similarity index 94% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerConfigurable.java rename to src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerConfigurable.java index 5dcc83ca1..8b9aec1d8 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerConfigurable.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerConfigurable.java @@ -11,14 +11,14 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.settings; +package com.redhat.devtools.lsp4ij.settings; import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.NamedConfigurable; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.NlsContexts; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; import org.jetbrains.annotations.Nullable; import javax.swing.*; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerListConfigurable.java b/src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerListConfigurable.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerListConfigurable.java rename to src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerListConfigurable.java index 306338ccd..19d050d6e 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerListConfigurable.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerListConfigurable.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.settings; +package com.redhat.devtools.lsp4ij.settings; import com.intellij.openapi.options.SearchableConfigurable; import com.intellij.openapi.project.Project; @@ -19,8 +19,8 @@ import com.intellij.openapi.util.NlsContexts; import com.intellij.ui.TreeUIHelper; import com.intellij.ui.speedSearch.SpeedSearchSupply; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; +import com.redhat.devtools.lsp4ij.LanguageServerBundle; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerView.java b/src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerView.java similarity index 93% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerView.java rename to src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerView.java index 4d1bb5771..cdf8ebe61 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/LanguageServerView.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/settings/LanguageServerView.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.settings; +package com.redhat.devtools.lsp4ij.settings; import com.intellij.openapi.Disposable; import com.intellij.openapi.ui.ComboBox; @@ -21,12 +21,11 @@ import com.intellij.util.ui.FormBuilder; import com.intellij.util.ui.JBUI; import com.intellij.util.ui.UI; -import com.redhat.devtools.intellij.lsp4ij.LanguageServerBundle; -import com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry; +import com.redhat.devtools.lsp4ij.LanguageServerBundle; +import com.redhat.devtools.lsp4ij.LanguageServersRegistry; import javax.swing.*; import javax.swing.border.TitledBorder; -import java.awt.*; /** * UI settings view to configure a given language server: diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/ServerTrace.java b/src/main/java/com/redhat/devtools/lsp4ij/settings/ServerTrace.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/ServerTrace.java rename to src/main/java/com/redhat/devtools/lsp4ij/settings/ServerTrace.java index 37b5aace7..59a101e26 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/ServerTrace.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/settings/ServerTrace.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.settings; +package com.redhat.devtools.lsp4ij.settings; /** * Language server trace level. diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/UserDefinedLanguageServerSettings.java b/src/main/java/com/redhat/devtools/lsp4ij/settings/UserDefinedLanguageServerSettings.java similarity index 92% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/UserDefinedLanguageServerSettings.java rename to src/main/java/com/redhat/devtools/lsp4ij/settings/UserDefinedLanguageServerSettings.java index 5f655a304..f9d675219 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/settings/UserDefinedLanguageServerSettings.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/settings/UserDefinedLanguageServerSettings.java @@ -11,15 +11,13 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.settings; +package com.redhat.devtools.lsp4ij.settings; -import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.*; import com.intellij.openapi.project.Project; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.xmlb.annotations.Tag; import com.intellij.util.xmlb.annotations.XCollection; -import com.redhat.devtools.intellij.lsp4ij.LanguageServiceAccessor; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/IconMapper.java b/src/main/java/com/redhat/devtools/lsp4ij/ui/IconMapper.java similarity index 98% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/IconMapper.java rename to src/main/java/com/redhat/devtools/lsp4ij/ui/IconMapper.java index 7b6059712..00672758b 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/IconMapper.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ui/IconMapper.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.ui; +package com.redhat.devtools.lsp4ij.ui; import com.intellij.icons.AllIcons; import com.intellij.openapi.util.IconLoader; diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/Messages.java b/src/main/java/com/redhat/devtools/lsp4ij/ui/Messages.java similarity index 98% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/Messages.java rename to src/main/java/com/redhat/devtools/lsp4ij/ui/Messages.java index df51a3df2..2211062ae 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/Messages.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ui/Messages.java @@ -11,7 +11,7 @@ * Angelo Zerr - Bug 525400 - [rename] improve rename support with ltk UI * Jan Koehnlein (TypeFox) add rename empty message *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.ui; +package com.redhat.devtools.lsp4ij.ui; public class Messages { diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/components/InspectionHyperlink.java b/src/main/java/com/redhat/devtools/lsp4ij/ui/components/InspectionHyperlink.java similarity index 97% rename from src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/components/InspectionHyperlink.java rename to src/main/java/com/redhat/devtools/lsp4ij/ui/components/InspectionHyperlink.java index 165f63e40..b00d26cbd 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4ij/ui/components/InspectionHyperlink.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/ui/components/InspectionHyperlink.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.ui.components; +package com.redhat.devtools.lsp4ij.ui.components; import com.intellij.ide.DataManager; import com.intellij.openapi.actionSystem.DataContext; diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index fe96c246a..765b866aa 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -18,14 +18,14 @@ - - + + + beanClass="com.redhat.devtools.lsp4ij.LanguageMappingExtensionPointBean"/> + beanClass="com.redhat.devtools.lsp4ij.ServerIconProviderExtensionPointBean"/> @@ -35,50 +35,50 @@ bundle="messages.LanguageServerBundle" nonDefaultProject="true" key="language.servers" - instance="com.redhat.devtools.intellij.lsp4ij.settings.LanguageServerListConfigurable"/> - + instance="com.redhat.devtools.lsp4ij.settings.LanguageServerListConfigurable"/> + - + + serviceImplementation="com.redhat.devtools.lsp4ij.lifecycle.LanguageServerLifecycleManager"/> + implementation="com.redhat.devtools.lsp4ij.operations.navigation.LSPGotoDeclarationHandler"/> + implementation="com.redhat.devtools.lsp4ij.operations.documentLink.LSPDocumentLinkGotoDeclarationHandler"/> + implementation="com.redhat.devtools.lsp4ij.operations.highlight.LSPHighlightUsagesHandlerFactory"/> + class="com.redhat.devtools.lsp4ij.ConnectDocumentToLanguageServerSetupParticipant"/> \ No newline at end of file diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/AdvancedTest.java b/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/AdvancedTest.java deleted file mode 100644 index 9076f8230..000000000 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/AdvancedTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2023 Red Hat Inc. and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 - * - * Contributors: - * Red Hat Inc. - initial API and implementation - *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; - -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; -import org.junit.Test; - -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; - -public class AdvancedTest { - - @Test - public void textAndlaceholdersAndTabStop() { - LspSnippetNode[] actual = parse("{#for ${1:item} in ${2:items}}\n\t{${1:item}.${3:name}}$0\n{/for}"); - assertEquals(actual, text("{#for "), // - placeholder(1, "item", 1), // ${1:item} - text(" in "), // - placeholder(2, "items", 1), // ${2:items} - text("}\n\t{"), // - placeholder(1, "item", 1), // ${1:item} - text("."), // - placeholder(3, "name", 1), // ${3:name} - text("}"), // - tabstop(0), // - text("\n{/for}")); - } - -} diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ExtractSnippetLinkedPositionTest.java b/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ExtractSnippetLinkedPositionTest.java deleted file mode 100644 index 60388255a..000000000 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ExtractSnippetLinkedPositionTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2023 Red Hat Inc. and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 - * - * Contributors: - * Red Hat Inc. - initial API and implementation - *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; - -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler.LinkedPositionResult; -import org.junit.Test; - -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; - -public class ExtractSnippetLinkedPositionTest { - - @Test - public void linkedPositions() { - LinkedPositionResult actual = parseLinkedPosition( - "{#for ${1:item} in ${2:items}}\n\t{${1:item}.${3:name}}$0\n{/for}", null); - assertEquals(actual, "{#for item in items}\n\t{item.name}\n{/for}", // - position("item", 6, 4), // - position("items", 14, 5), // - position("item", 23, 4), // - position("name", 28, 4)); - } - - @Test - public void linkedPositionsWithIndentOptions() { - LspSnippetIndentOptions indentOptions = new LspSnippetIndentOptions(4, true, "\r\n"); - LinkedPositionResult actual = parseLinkedPosition( - "{#for ${1:item} in ${2:items}}\n\t{${1:item}.${3:name}}$0\n{/for}", indentOptions); - assertEquals(actual, "{#for item in items}\r\n {item.name}\r\n{/for}", // - position("item", 6, 4), // - position("items", 14, 5), // - position("item", 27, 4), // - position("name", 32, 4)); - } - - @Test - public void linkedPositionsWithIndentOptionsAndCLRF() { - LspSnippetIndentOptions indentOptions = new LspSnippetIndentOptions(4, true, "\r\n"); - LinkedPositionResult actual = parseLinkedPosition( - "{#for ${1:item} in ${2:items}}\r\n\t{${1:item}.${3:name}}$0\r\n{/for}", indentOptions); - assertEquals(actual, "{#for item in items}\r\n {item.name}\r\n{/for}", // - position("item", 6, 4), // - position("items", 14, 5), // - position("item", 27, 4), // - position("name", 32, 4)); - } -} diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/TabstopTest.java b/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/TabstopTest.java deleted file mode 100644 index a9941ba8e..000000000 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/TabstopTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2023 Red Hat Inc. and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 - * - * Contributors: - * Red Hat Inc. - initial API and implementation - *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; - -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; -import org.junit.Test; - -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; - -public class TabstopTest { - - @Test - public void onlyTabstop() { - LspSnippetNode[] actual = parse("$123"); - assertEquals(actual, tabstop(123)); - } - - @Test - public void tabstopWithText() { - LspSnippetNode[] actual = parse("abcd $123 efgh"); - assertEquals(actual, - text("abcd "), // - tabstop(123), // - text(" efgh")); - } - - @Test - public void tabstopInBracket() { - LspSnippetNode[] actual = parse("${123}"); - assertEquals(actual, tabstop(123)); - } - - @Test - public void tabstopInBracketWithText() { - LspSnippetNode[] actual = parse("abcd ${123} efgh"); - assertEquals(actual, text("abcd "), // - tabstop(123), // - text(" efgh")); - } - -} diff --git a/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/AdvancedTest.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/AdvancedTest.java new file mode 100644 index 000000000..44773dd8d --- /dev/null +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/AdvancedTest.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2023 Red Hat Inc. and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 + * which is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 + * + * Contributors: + * Red Hat Inc. - initial API and implementation + *******************************************************************************/ +package com.redhat.devtools.lsp4ij.operations.completion.snippet; + +import com.redhat.devtools.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; +import org.junit.Test; + +import static com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; + +public class AdvancedTest { + + @Test + public void textAndlaceholdersAndTabStop() { + LspSnippetNode[] actual = LspSnippetAssert.parse("{#for ${1:item} in ${2:items}}\n\t{${1:item}.${3:name}}$0\n{/for}"); + assertEquals(actual, LspSnippetAssert.text("{#for "), // + LspSnippetAssert.placeholder(1, "item", 1), // ${1:item} + LspSnippetAssert.text(" in "), // + LspSnippetAssert.placeholder(2, "items", 1), // ${2:items} + LspSnippetAssert.text("}\n\t{"), // + LspSnippetAssert.placeholder(1, "item", 1), // ${1:item} + LspSnippetAssert.text("."), // + LspSnippetAssert.placeholder(3, "name", 1), // ${3:name} + LspSnippetAssert.text("}"), // + LspSnippetAssert.tabstop(0), // + LspSnippetAssert.text("\n{/for}")); + } + +} diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ChoiceTest.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ChoiceTest.java similarity index 75% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ChoiceTest.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ChoiceTest.java index afe6908d0..793882f12 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/ChoiceTest.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ChoiceTest.java @@ -11,12 +11,12 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; import org.junit.Test; -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; +import static com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; public class ChoiceTest { diff --git a/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ExtractSnippetLinkedPositionTest.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ExtractSnippetLinkedPositionTest.java new file mode 100644 index 000000000..17b782224 --- /dev/null +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/ExtractSnippetLinkedPositionTest.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2023 Red Hat Inc. and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 + * which is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 + * + * Contributors: + * Red Hat Inc. - initial API and implementation + *******************************************************************************/ +package com.redhat.devtools.lsp4ij.operations.completion.snippet; + +import com.redhat.devtools.lsp4ij.operations.completion.snippet.handler.LinkedPositionResult; +import org.junit.Test; + +public class ExtractSnippetLinkedPositionTest { + + @Test + public void linkedPositions() { + LinkedPositionResult actual = LspSnippetAssert.parseLinkedPosition( + "{#for ${1:item} in ${2:items}}\n\t{${1:item}.${3:name}}$0\n{/for}", null); + LspSnippetAssert.assertEquals(actual, "{#for item in items}\n\t{item.name}\n{/for}", // + LspSnippetAssert.position("item", 6, 4), // + LspSnippetAssert.position("items", 14, 5), // + LspSnippetAssert.position("item", 23, 4), // + LspSnippetAssert.position("name", 28, 4)); + } + + @Test + public void linkedPositionsWithIndentOptions() { + LspSnippetIndentOptions indentOptions = new LspSnippetIndentOptions(4, true, "\r\n"); + LinkedPositionResult actual = LspSnippetAssert.parseLinkedPosition( + "{#for ${1:item} in ${2:items}}\n\t{${1:item}.${3:name}}$0\n{/for}", indentOptions); + LspSnippetAssert.assertEquals(actual, "{#for item in items}\r\n {item.name}\r\n{/for}", // + LspSnippetAssert.position("item", 6, 4), // + LspSnippetAssert.position("items", 14, 5), // + LspSnippetAssert.position("item", 27, 4), // + LspSnippetAssert.position("name", 32, 4)); + } + + @Test + public void linkedPositionsWithIndentOptionsAndCLRF() { + LspSnippetIndentOptions indentOptions = new LspSnippetIndentOptions(4, true, "\r\n"); + LinkedPositionResult actual = LspSnippetAssert.parseLinkedPosition( + "{#for ${1:item} in ${2:items}}\r\n\t{${1:item}.${3:name}}$0\r\n{/for}", indentOptions); + LspSnippetAssert.assertEquals(actual, "{#for item in items}\r\n {item.name}\r\n{/for}", // + LspSnippetAssert.position("item", 6, 4), // + LspSnippetAssert.position("items", 14, 5), // + LspSnippetAssert.position("item", 27, 4), // + LspSnippetAssert.position("name", 32, 4)); + } +} diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetAssert.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetAssert.java similarity index 92% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetAssert.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetAssert.java index f8b467f3f..bdffab2f1 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/LspSnippetAssert.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/LspSnippetAssert.java @@ -11,9 +11,9 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler.*; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.handler.*; import org.junit.Assert; import java.util.Arrays; diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/PlaceholderTest.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/PlaceholderTest.java similarity index 63% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/PlaceholderTest.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/PlaceholderTest.java index fbbec32fc..66b4dd26c 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/PlaceholderTest.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/PlaceholderTest.java @@ -11,19 +11,19 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; import org.junit.Test; -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; +import static com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; public class PlaceholderTest { @Test public void simpleText() { - LspSnippetNode[] actual = parse("${1:name}"); - assertEquals(actual, placeholder(1, "name", 1)); + LspSnippetNode[] actual = LspSnippetAssert.parse("${1:name}"); + assertEquals(actual, LspSnippetAssert.placeholder(1, "name", 1)); } } diff --git a/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/TabstopTest.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/TabstopTest.java new file mode 100644 index 000000000..ccd51af58 --- /dev/null +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/TabstopTest.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2023 Red Hat Inc. and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 + * which is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 + * + * Contributors: + * Red Hat Inc. - initial API and implementation + *******************************************************************************/ +package com.redhat.devtools.lsp4ij.operations.completion.snippet; + +import com.redhat.devtools.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; +import org.junit.Test; + +public class TabstopTest { + + @Test + public void onlyTabstop() { + LspSnippetNode[] actual = LspSnippetAssert.parse("$123"); + LspSnippetAssert.assertEquals(actual, LspSnippetAssert.tabstop(123)); + } + + @Test + public void tabstopWithText() { + LspSnippetNode[] actual = LspSnippetAssert.parse("abcd $123 efgh"); + LspSnippetAssert.assertEquals(actual, + LspSnippetAssert.text("abcd "), // + LspSnippetAssert.tabstop(123), // + LspSnippetAssert.text(" efgh")); + } + + @Test + public void tabstopInBracket() { + LspSnippetNode[] actual = LspSnippetAssert.parse("${123}"); + LspSnippetAssert.assertEquals(actual, LspSnippetAssert.tabstop(123)); + } + + @Test + public void tabstopInBracketWithText() { + LspSnippetNode[] actual = LspSnippetAssert.parse("abcd ${123} efgh"); + LspSnippetAssert.assertEquals(actual, LspSnippetAssert.text("abcd "), // + LspSnippetAssert.tabstop(123), // + LspSnippetAssert.text(" efgh")); + } + +} diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/TextTest.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/TextTest.java similarity index 73% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/TextTest.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/TextTest.java index 0664ed68d..1d5bea554 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/TextTest.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/TextTest.java @@ -11,12 +11,12 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; import org.junit.Test; -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; +import static com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; public class TextTest { diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/VariableTest.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/VariableTest.java similarity index 82% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/VariableTest.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/VariableTest.java index 12a655ecd..632aa99ca 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/VariableTest.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/VariableTest.java @@ -11,12 +11,12 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet; +package com.redhat.devtools.lsp4ij.operations.completion.snippet; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.handler.LspSnippetNode; import org.junit.Test; -import static com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; +import static com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetAssert.*; public class VariableTest { diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/ChoiceNode.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/ChoiceNode.java similarity index 93% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/ChoiceNode.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/ChoiceNode.java index 9dc9efa3f..7677021bf 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/ChoiceNode.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/ChoiceNode.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; import java.util.List; import java.util.stream.Collectors; diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/ExtractSnippetLinkedPositionHandler.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/ExtractSnippetLinkedPositionHandler.java similarity index 84% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/ExtractSnippetLinkedPositionHandler.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/ExtractSnippetLinkedPositionHandler.java index c69029514..50157889b 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/ExtractSnippetLinkedPositionHandler.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/ExtractSnippetLinkedPositionHandler.java @@ -11,11 +11,11 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.DefaultLspSnippetHandler; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetVariableConstants; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.DefaultLspSnippetHandler; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetIndentOptions; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetVariableConstants; import java.util.ArrayList; import java.util.List; diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LinkedPosition.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LinkedPosition.java similarity index 92% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LinkedPosition.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LinkedPosition.java index ede115430..c44516ac5 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LinkedPosition.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LinkedPosition.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; public class LinkedPosition { diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LinkedPositionResult.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LinkedPositionResult.java similarity index 90% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LinkedPositionResult.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LinkedPositionResult.java index 18c1ebf8b..f4c5a0201 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LinkedPositionResult.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LinkedPositionResult.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; import java.util.List; diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LspSnippetHandlerImpl.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LspSnippetHandlerImpl.java similarity index 89% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LspSnippetHandlerImpl.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LspSnippetHandlerImpl.java index 3308ba0de..a8dd9efed 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LspSnippetHandlerImpl.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LspSnippetHandlerImpl.java @@ -11,9 +11,9 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; -import com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.LspSnippetHandler; +import com.redhat.devtools.lsp4ij.operations.completion.snippet.LspSnippetHandler; import java.util.ArrayList; import java.util.List; diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LspSnippetNode.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LspSnippetNode.java similarity index 86% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LspSnippetNode.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LspSnippetNode.java index af1d29861..fa4808e04 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/LspSnippetNode.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/LspSnippetNode.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; public interface LspSnippetNode { diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/PlaceholderNode.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/PlaceholderNode.java similarity index 92% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/PlaceholderNode.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/PlaceholderNode.java index 5cc597750..369f1acea 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/PlaceholderNode.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/PlaceholderNode.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; public class PlaceholderNode implements LspSnippetNode { diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/TabstopNode.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/TabstopNode.java similarity index 91% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/TabstopNode.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/TabstopNode.java index 82e7fe217..65d61b280 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/TabstopNode.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/TabstopNode.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; public class TabstopNode implements LspSnippetNode { diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/TextNode.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/TextNode.java similarity index 91% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/TextNode.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/TextNode.java index 6d7796493..2472129aa 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/TextNode.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/TextNode.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; public class TextNode implements LspSnippetNode { diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/VariableNode.java b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/VariableNode.java similarity index 91% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/VariableNode.java rename to src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/VariableNode.java index 451c77d53..b5f113785 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/snippet/handler/VariableNode.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/operations/completion/snippet/handler/VariableNode.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.operations.completion.snippet.handler; +package com.redhat.devtools.lsp4ij.operations.completion.snippet.handler; public class VariableNode implements LspSnippetNode { diff --git a/src/test/java/com/redhat/devtools/intellij/lsp4ij/ui/IconMapperTest.java b/src/test/java/com/redhat/devtools/lsp4ij/ui/IconMapperTest.java similarity index 90% rename from src/test/java/com/redhat/devtools/intellij/lsp4ij/ui/IconMapperTest.java rename to src/test/java/com/redhat/devtools/lsp4ij/ui/IconMapperTest.java index d962f854d..2e6f9947f 100644 --- a/src/test/java/com/redhat/devtools/intellij/lsp4ij/ui/IconMapperTest.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/ui/IconMapperTest.java @@ -11,12 +11,12 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package com.redhat.devtools.intellij.lsp4ij.ui; +package com.redhat.devtools.lsp4ij.ui; import org.eclipse.lsp4j.CompletionItemKind; import org.junit.Test; -import static com.redhat.devtools.intellij.lsp4ij.ui.IconMapper.getIcon; +import static com.redhat.devtools.lsp4ij.ui.IconMapper.getIcon; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull;