From b72a6c3d93df1f5beb7f1c1e06014e9f8df0ee12 Mon Sep 17 00:00:00 2001 From: Alexander Fedorov Date: Fri, 20 Dec 2019 20:32:38 +0300 Subject: [PATCH] Bug 558516 - Normalize i18n for CDT LSP component Revisited all the i18n Change-Id: Ic5b14ee68cb3d0164f179a9d2690573a82f356d8 Signed-off-by: Alexander Fedorov --- .../META-INF/MANIFEST.MF | 6 ++- .../core/CPPLanguageServerPreferencePage.java | 34 ++++++++++------- .../lsp/core/CPPResourceChangeListener.java | 18 +++++---- .../lsp/core/CPPStreamConnectionProvider.java | 16 +++++--- .../org/eclipse/cdt/lsp/core/Messages.java | 27 -------------- .../eclipse/cdt/lsp/core/Messages.properties | 17 --------- .../core/Server2ClientProtocolExtension.java | 20 ++++++---- .../cdt/lsp/core/cquery/CquerySymbolKind.java | 19 +++++++--- .../core/cquery/ExtendedSymbolKindType.java | 17 ++++++--- .../cdt/lsp/core/cquery/StorageClass.java | 19 +++++++--- .../lsp/internal/core/LspCoreMessages.java | 34 +++++++++++++++++ .../internal/core/LspCoreMessages.properties | 19 ++++++++++ .../cdt/lsp/internal/ui/LspUiMessages.java | 37 +++++++++++++++++++ .../lsp/internal/ui/LspUiMessages.properties | 22 +++++++++++ 14 files changed, 208 insertions(+), 97 deletions(-) delete mode 100644 lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Messages.java delete mode 100644 lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Messages.properties create mode 100644 lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/core/LspCoreMessages.java create mode 100644 lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/core/LspCoreMessages.properties create mode 100644 lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/ui/LspUiMessages.java create mode 100644 lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/ui/LspUiMessages.properties diff --git a/lsp/org.eclipse.cdt.lsp.core/META-INF/MANIFEST.MF b/lsp/org.eclipse.cdt.lsp.core/META-INF/MANIFEST.MF index 679199bdd8a..788380e2338 100644 --- a/lsp/org.eclipse.cdt.lsp.core/META-INF/MANIFEST.MF +++ b/lsp/org.eclipse.cdt.lsp.core/META-INF/MANIFEST.MF @@ -23,7 +23,9 @@ Require-Bundle: com.google.gson;bundle-version="2.8.2", org.eclipse.cdt.ui Import-Package: org.eclipse.ui.editors.text, org.eclipse.ui.texteditor -Export-Package: org.eclipse.cdt.lsp.core, - org.eclipse.cdt.lsp.core.cquery +Export-Package: org.eclipse.cdt.lsp.core;x-internal:=true, + org.eclipse.cdt.lsp.core.cquery;x-internal:=true, + org.eclipse.cdt.lsp.internal.core;x-internal:=true, + org.eclipse.cdt.lsp.internal.ui;x-internal:=true Bundle-Activator: org.eclipse.cdt.lsp.core.Activator Bundle-ActivationPolicy: lazy diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPLanguageServerPreferencePage.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPLanguageServerPreferencePage.java index 41cd031a3d6..1aea605bdec 100644 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPLanguageServerPreferencePage.java +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPLanguageServerPreferencePage.java @@ -1,18 +1,23 @@ /******************************************************************************* - * Copyright (c) 2018 Manish Khurana , Nathan Ridge and others. + * Copyright (c) 2018-2019 Manish Khurana, Nathan Ridge and others. * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. * * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Manish Khurana - initial API and implementation + * Nathan Ridge - initial API and implementation + * Alexander Fedorov - Bug 558516 *******************************************************************************/ package org.eclipse.cdt.lsp.core; import java.io.File; +import org.eclipse.cdt.lsp.internal.ui.LspUiMessages; import org.eclipse.jface.preference.FieldEditor; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.FileFieldEditor; @@ -35,24 +40,27 @@ public class CPPLanguageServerPreferencePage extends FieldEditorPreferencePage i public CPPLanguageServerPreferencePage() { super(GRID); setPreferenceStore(Activator.getDefault().getPreferenceStore()); - setDescription(Messages.PreferencePageDescription); + setDescription(LspUiMessages.CPPLanguageServerPreferencePage_description); } @Override public void createFieldEditors() { - serverChoice = new RadioGroupFieldEditor(PreferenceConstants.P_SERVER_CHOICE, Messages.ServerChoiceLabel, 1, - new String[][] { { "ClangD", CPPStreamConnectionProvider.CLANGD_ID }, //$NON-NLS-1$ - { "CQuery", CPPStreamConnectionProvider.CQUERY_ID } }, //$NON-NLS-1$ + serverChoice = new RadioGroupFieldEditor(PreferenceConstants.P_SERVER_CHOICE, + LspUiMessages.CPPLanguageServerPreferencePage_server_selector, 1, + new String[][] { + { LspUiMessages.CPPLanguageServerPreferencePage_clangd, CPPStreamConnectionProvider.CLANGD_ID }, + { LspUiMessages.CPPLanguageServerPreferencePage_cquery, + CPPStreamConnectionProvider.CQUERY_ID } }, getFieldEditorParent()); addField(serverChoice); - serverPath = new FileFieldEditor(PreferenceConstants.P_SERVER_PATH, Messages.ServerPathLabel, - getFieldEditorParent()); + serverPath = new FileFieldEditor(PreferenceConstants.P_SERVER_PATH, + LspUiMessages.CPPLanguageServerPreferencePage_server_path, getFieldEditorParent()); addField(serverPath); - serverOptions = new StringFieldEditor(PreferenceConstants.P_SERVER_OPTIONS, Messages.ServerOptionsLabel, - getFieldEditorParent()); + serverOptions = new StringFieldEditor(PreferenceConstants.P_SERVER_OPTIONS, + LspUiMessages.CPPLanguageServerPreferencePage_server_options, getFieldEditorParent()); addField(serverOptions); } diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPResourceChangeListener.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPResourceChangeListener.java index 19bc358e8ca..10fa5ae117e 100644 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPResourceChangeListener.java +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPResourceChangeListener.java @@ -1,12 +1,15 @@ /******************************************************************************* - * Copyright (c) 2017 Ericsson and others. + * Copyright (c) 2017-2019 Ericsson and others. * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. * * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Ericsson - initial API and implementation + * Alexander Fedorov - Bug 558516 *******************************************************************************/ package org.eclipse.cdt.lsp.core; @@ -22,13 +25,14 @@ import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.runtime.CoreException; +import org.eclipse.lsp4e.LanguageServerWrapper; import org.eclipse.lsp4e.LanguageServersRegistry; import org.eclipse.lsp4e.LanguageServersRegistry.LanguageServerDefinition; import org.eclipse.lsp4e.LanguageServiceAccessor; -import org.eclipse.lsp4e.LanguageServerWrapper; import org.eclipse.lsp4j.DidChangeWatchedFilesParams; import org.eclipse.lsp4j.FileChangeType; import org.eclipse.lsp4j.FileEvent; +import org.eclipse.osgi.util.NLS; /** * A resource listener used to generate FileEvents, as part of the LSP. This @@ -114,7 +118,7 @@ final class CPPResourceChangeListener implements IResourceChangeListener { } else if (delta.getKind() == IResourceDelta.REMOVED) { changeType = FileChangeType.Deleted; } else { - throw new IllegalStateException("Unsupported resource delta kind: " + delta.getKind()); //$NON-NLS-1$ + throw new IllegalStateException(NLS.bind("Unsupported resource delta kind: {0}", delta.getKind())); //$NON-NLS-1$ } return new FileEvent(locationURI.toString(), changeType); diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPStreamConnectionProvider.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPStreamConnectionProvider.java index 87f0481ca87..e672526692d 100644 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPStreamConnectionProvider.java +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/CPPStreamConnectionProvider.java @@ -1,12 +1,15 @@ /******************************************************************************* - * Copyright (c) 2017 Ericsson and others. + * Copyright (c) 2017-2019 Ericsson and others. * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. * * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Ericsson - initial API and implementation + * Alexander Fedorov - Bug 558516 *******************************************************************************/ package org.eclipse.cdt.lsp.core; @@ -20,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.commons.io.IOUtils; +import org.eclipse.cdt.lsp.internal.core.LspCoreMessages; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResourceChangeListener; @@ -49,7 +53,7 @@ public class CPPStreamConnectionProvider extends ProcessStreamConnectionProvider } else if (store.getString(PreferenceConstants.P_SERVER_CHOICE).equals(CLANGD_ID)) { languageServer = new ClangdLanguageServer(); } else { - throw new UnsupportedOperationException("Unsupported Language Server"); //$NON-NLS-1$ + throw new UnsupportedOperationException(LspCoreMessages.CPPStreamConnectionProvider_e_unsupported); } File defaultLSLocation = getDefaultLSLocation(store.getString(PreferenceConstants.P_SERVER_CHOICE)); if (defaultLSLocation != null) { diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Messages.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Messages.java deleted file mode 100644 index 4b2dd274e04..00000000000 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Messages.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 Manish Khurana , Nathan Ridge and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -package org.eclipse.cdt.lsp.core; - -import org.eclipse.osgi.util.NLS; - -public class Messages extends NLS { - public static String PreferencePageDescription; - public static String ServerChoiceLabel; - public static String ServerPathLabel; - public static String ServerOptionsLabel; - public static String CqueryStateIdle; - public static String CqueryStateBusy; - - static { - NLS.initializeMessages(Messages.class.getName(), Messages.class); - } -} diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Messages.properties b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Messages.properties deleted file mode 100644 index 31a3b4ff5a5..00000000000 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Messages.properties +++ /dev/null @@ -1,17 +0,0 @@ -################################################################################ -# Copyright (c) 2018 Manish Khurana , Nathan Ridge and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -################################################################################# - -PreferencePageDescription=Preferences for the C/C++ Language Server\n\n -ServerChoiceLabel=Please select the C/C++ Language Server you want to use in Eclipse : -ServerPathLabel=Browse path to the server executable -ServerOptionsLabel=Enter any command-line options for the server -CqueryStateIdle=CQuery : Idle -CqueryStateBusy=CQuery : Busy | {0} Jobs \ No newline at end of file diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Server2ClientProtocolExtension.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Server2ClientProtocolExtension.java index 31071e6a69d..55de673f8bb 100644 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Server2ClientProtocolExtension.java +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/Server2ClientProtocolExtension.java @@ -1,12 +1,16 @@ /******************************************************************************* - * Copyright (c) 2018 Manish Khurana , Nathan Ridge and others. + * Copyright (c) 2018-2019 Manish Khurana, Nathan Ridge and others. * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. * * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Manish Khurana - initial API and implementation + * Nathan Ridge - initial API and implementation + * Alexander Fedorov - Bug 558516 *******************************************************************************/ package org.eclipse.cdt.lsp.core; @@ -21,6 +25,7 @@ import org.eclipse.cdt.lsp.core.cquery.CqueryInactiveRegions; import org.eclipse.cdt.lsp.core.cquery.CquerySemanticHighlights; import org.eclipse.cdt.lsp.core.cquery.HighlightSymbol; import org.eclipse.cdt.lsp.core.cquery.IndexingProgressStats; +import org.eclipse.cdt.lsp.internal.core.LspCoreMessages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.PreferenceConstants; import org.eclipse.core.resources.IFile; @@ -65,8 +70,9 @@ public class Server2ClientProtocolExtension extends LanguageClientImpl { cqueryStatusField = new StatusLineContributionItem(cqueryStatusFieldId, width); statusLine.add(cqueryStatusField); } - String msg = stats.getTotalJobs() > 0 ? NLS.bind(Messages.CqueryStateBusy, stats.getTotalJobs()) - : Messages.CqueryStateIdle; + String msg = stats.getTotalJobs() > 0 + ? NLS.bind(LspCoreMessages.Server2ClientProtocolExtension_cquery_busy, stats.getTotalJobs()) + : LspCoreMessages.Server2ClientProtocolExtension_cquery_idle; cqueryStatusField.setText(msg); } }); diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/CquerySymbolKind.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/CquerySymbolKind.java index 7d41701a975..721383b57cf 100644 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/CquerySymbolKind.java +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/CquerySymbolKind.java @@ -1,16 +1,23 @@ /******************************************************************************* - * Copyright (c) 2018 Manish Khurana , Nathan Ridge and others. + * Copyright (c) 2018-2019 Manish Khurana, Nathan Ridge and others. * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. * * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Manish Khurana - initial API and implementation + * Nathan Ridge - initial API and implementation + * Alexander Fedorov - Bug 558516 *******************************************************************************/ package org.eclipse.cdt.lsp.core.cquery; +import org.eclipse.cdt.lsp.internal.core.LspCoreMessages; +import org.eclipse.osgi.util.NLS; + enum CquerySymbolKind { Unknown(0), TypeAlias(252), Parameter(253), StaticMethod(254), Macro(255); @@ -37,7 +44,7 @@ enum CquerySymbolKind { case 255: return CquerySymbolKind.Macro; default: - throw new IllegalArgumentException("Illegal value for cquery symbol kind"); //$NON-NLS-1$ + throw new IllegalArgumentException(NLS.bind(LspCoreMessages.CquerySymbolKind_e_illegal_value, value)); } } } \ No newline at end of file diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/ExtendedSymbolKindType.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/ExtendedSymbolKindType.java index 205dc0acad1..729842bd72b 100644 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/ExtendedSymbolKindType.java +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/ExtendedSymbolKindType.java @@ -1,12 +1,16 @@ /******************************************************************************* - * Copyright (c) 2018 Manish Khurana , Nathan Ridge and others. + * Copyright (c) 2018-2019 Manish Khurana, Nathan Ridge and others. * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. * * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Manish Khurana - initial API and implementation + * Nathan Ridge - initial API and implementation + * Alexander Fedorov - Bug 558516 *******************************************************************************/ package org.eclipse.cdt.lsp.core.cquery; @@ -29,6 +33,7 @@ public class ExtendedSymbolKindType { int value; transient boolean isProtocolSymbol; + //FIXME: let's rework this example of "Exception-driven programming" public ExtendedSymbolKindType(int _v) { try { SymbolKind.forValue(_v); @@ -40,7 +45,7 @@ public class ExtendedSymbolKindType { value = _v; isProtocolSymbol = false; } catch (IllegalArgumentException y) { - throw new IllegalArgumentException("Illegal value for SymbolKind"); //$NON-NLS-1$ + throw y; } } } diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/StorageClass.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/StorageClass.java index 91ddd72986a..44480c30ed0 100644 --- a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/StorageClass.java +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/core/cquery/StorageClass.java @@ -1,16 +1,23 @@ /******************************************************************************* - * Copyright (c) 2018 Manish Khurana , Nathan Ridge and others. + * Copyright (c) 2018-2019 Manish Khurana, Nathan Ridge and others. * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. * * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Manish Khurana - initial API and implementation + * Nathan Ridge - initial API and implementation + * Alexander Fedorov - Bug 558516 *******************************************************************************/ package org.eclipse.cdt.lsp.core.cquery; +import org.eclipse.cdt.lsp.internal.core.LspCoreMessages; +import org.eclipse.osgi.util.NLS; + public enum StorageClass { Invalid(0), None(1), Extern(2), Static(3), PrivateExtern(4), Auto(5), Register(6); @@ -27,7 +34,7 @@ public enum StorageClass { public static StorageClass forValue(int value) { StorageClass[] allValues = StorageClass.values(); if (value < 1 || value > allValues.length) { - throw new IllegalArgumentException("Illegal enum value: " + value); //$NON-NLS-1$ + throw new IllegalArgumentException(NLS.bind(LspCoreMessages.StorageClass_e_illegal_value, value)); } return allValues[value - 1]; } diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/core/LspCoreMessages.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/core/LspCoreMessages.java new file mode 100644 index 00000000000..1f5eb975fbe --- /dev/null +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/core/LspCoreMessages.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2019 Eclipse Foundation and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Alexander Fedorov - initial API and implementatin + *******************************************************************************/ +package org.eclipse.cdt.lsp.internal.core; + +import org.eclipse.osgi.util.NLS; + +public class LspCoreMessages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.cdt.lsp.internal.core.LspCoreMessages"; //$NON-NLS-1$ + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, LspCoreMessages.class); + } + + public static String CPPStreamConnectionProvider_e_unsupported; + public static String CquerySymbolKind_e_illegal_value; + public static String Server2ClientProtocolExtension_cquery_busy; + public static String Server2ClientProtocolExtension_cquery_idle; + public static String StorageClass_e_illegal_value; + + private LspCoreMessages() { + } +} diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/core/LspCoreMessages.properties b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/core/LspCoreMessages.properties new file mode 100644 index 00000000000..a94d55dcd0b --- /dev/null +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/core/LspCoreMessages.properties @@ -0,0 +1,19 @@ +############################################################################### +# Copyright (c) 2019 Eclipse Foundation and others +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# https://www.eclipse.org/legal/epl-2.0/. +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Eclipse Foundation - initial API and implementation +# Alexander Fedorov - Bug 558484 +############################################################################### + +CPPStreamConnectionProvider_e_unsupported=Unsupported Language Server +CquerySymbolKind_e_illegal_value=Illegal value {0} for cquery symbol kind +Server2ClientProtocolExtension_cquery_busy=CQuery : Busy | {0} Jobs +Server2ClientProtocolExtension_cquery_idle=CQuery : Idle +StorageClass_e_illegal_value=Illegal enum value: {0} diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/ui/LspUiMessages.java b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/ui/LspUiMessages.java new file mode 100644 index 00000000000..8e97df5ab6c --- /dev/null +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/ui/LspUiMessages.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2019 Eclipse Foundation and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Alexander Fedorov - initial API and implementatin + *******************************************************************************/ + +package org.eclipse.cdt.lsp.internal.ui; + +import org.eclipse.osgi.util.NLS; + +public class LspUiMessages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.cdt.lsp.internal.ui.LspUiMessages"; //$NON-NLS-1$ + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, LspUiMessages.class); + } + + public static String CPPLanguageServerPreferencePage_clangd; + public static String CPPLanguageServerPreferencePage_cquery; + + public static String CPPLanguageServerPreferencePage_description; + public static String CPPLanguageServerPreferencePage_server_options; + public static String CPPLanguageServerPreferencePage_server_path; + public static String CPPLanguageServerPreferencePage_server_selector; + + private LspUiMessages() { + } +} diff --git a/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/ui/LspUiMessages.properties b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/ui/LspUiMessages.properties new file mode 100644 index 00000000000..2fc0c93d5e5 --- /dev/null +++ b/lsp/org.eclipse.cdt.lsp.core/src/org/eclipse/cdt/lsp/internal/ui/LspUiMessages.properties @@ -0,0 +1,22 @@ +############################################################################### +# Copyright (c) 2019 Eclipse Foundation and others +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# https://www.eclipse.org/legal/epl-2.0/. +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Eclipse Foundation - initial API and implementation +# Alexander Fedorov - Bug 558484 +############################################################################### + +CPPLanguageServerPreferencePage_clangd=ClangD + +CPPLanguageServerPreferencePage_cquery=CQuery + +CPPLanguageServerPreferencePage_description=Preferences for the C/C++ Language Server\n\n +CPPLanguageServerPreferencePage_server_options=Enter any command-line options for the server +CPPLanguageServerPreferencePage_server_path=Browse path to the server executable +CPPLanguageServerPreferencePage_server_selector=Please select the C/C++ Language Server you want to use in Eclipse :