mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 563280 Split language server flags into separate commands
Change-Id: If7c8e823f7da289a4567b8cb6030f504a830364f
Signed-off-by: Philip Langer <planger@eclipsesource.com>
(cherry picked from commit 081069afcd
)
This commit is contained in:
parent
ee33583d8e
commit
e8455e10a0
5 changed files with 16 additions and 12 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Automatic-Module-Name: org.eclipse.cdt.lsp.core
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: org.eclipse.cdt.lsp.core;singleton:=true
|
||||
Bundle-Version: 1.1.0.qualifier
|
||||
Bundle-Version: 1.1.100.qualifier
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2017-2019 Ericsson and others.
|
||||
* Copyright (c) 2017-2020 Ericsson 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
|
||||
|
@ -10,6 +10,7 @@
|
|||
* Contributors:
|
||||
* Ericsson - initial API and implementation
|
||||
* Alexander Fedorov <alexander.fedorov@arsysop.ru> - Bug 558516
|
||||
* Philip Langer <planger@eclipsesource.com> - Bug 563280
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.lsp.core;
|
||||
|
@ -20,10 +21,12 @@ import java.io.IOException;
|
|||
import java.io.InputStreamReader;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.internal.cquery.core.CqueryLanguageServer;
|
||||
import org.eclipse.cdt.lsp.internal.core.LspCoreMessages;
|
||||
import org.eclipse.cdt.utils.CommandLineUtil;
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResourceChangeListener;
|
||||
|
@ -66,7 +69,7 @@ public class CPPStreamConnectionProvider extends ProcessStreamConnectionProvider
|
|||
if (languageServerLocation != null) {
|
||||
commands.add(languageServerLocation.getAbsolutePath());
|
||||
if (!flags.isEmpty()) {
|
||||
commands.add(flags);
|
||||
commands.addAll(Arrays.asList(CommandLineUtil.argumentsToArray(flags)));
|
||||
}
|
||||
parent = languageServerLocation.getParent();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Automatic-Module-Name: org.eclipse.cdt.lsp.ui
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: org.eclipse.cdt.lsp.ui;singleton:=true
|
||||
Bundle-Version: 0.1.0.qualifier
|
||||
Bundle-Version: 0.1.100.qualifier
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2019 Eclipse Foundation and others
|
||||
# Copyright (c) 2019-2020 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
|
||||
|
@ -10,6 +10,7 @@
|
|||
# Contributors:
|
||||
# Eclipse Foundation - initial API and implementation
|
||||
# Alexander Fedorov <alexander.fedorov@arsysop.ru> - Bug 558484
|
||||
# Philip Langer <planger@eclipsesource.com> - Bug 563280
|
||||
###############################################################################
|
||||
|
||||
CPPLanguageServerPreferencePage_clangd=ClangD
|
||||
|
@ -17,6 +18,6 @@ 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_options=Command-line options for the server
|
||||
CPPLanguageServerPreferencePage_server_path=Path to the server executable
|
||||
CPPLanguageServerPreferencePage_server_selector=Please select the C/C++ Language Server you want to use in Eclipse :
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2018-2019 Manish Khurana, Nathan Ridge and others.
|
||||
* Copyright (c) 2018-2020 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 is available at
|
||||
|
@ -11,6 +11,7 @@
|
|||
* Manish Khurana <mkmanishkhurana98@gmail.com> - initial API and implementation
|
||||
* Nathan Ridge <zeratul976@hotmail.com> - initial API and implementation
|
||||
* Alexander Fedorov <alexander.fedorov@arsysop.ru> - Bug 558516
|
||||
* Philip Langer <planger@eclipsesource.com> - Bug 563280
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.lsp.internal.ui.preferences;
|
||||
|
@ -21,11 +22,11 @@ import org.eclipse.cdt.lsp.core.CPPStreamConnectionProvider;
|
|||
import org.eclipse.cdt.lsp.core.PreferenceConstants;
|
||||
import org.eclipse.cdt.lsp.internal.ui.LspUiActivator;
|
||||
import org.eclipse.cdt.lsp.internal.ui.LspUiMessages;
|
||||
import org.eclipse.cdt.ui.newui.MultiLineTextFieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||
import org.eclipse.jface.preference.FileFieldEditor;
|
||||
import org.eclipse.jface.preference.RadioGroupFieldEditor;
|
||||
import org.eclipse.jface.preference.StringFieldEditor;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
|
@ -38,7 +39,7 @@ public class CPPLanguageServerPreferencePage extends FieldEditorPreferencePage i
|
|||
|
||||
private FileFieldEditor serverPath;
|
||||
private RadioGroupFieldEditor serverChoice;
|
||||
private StringFieldEditor serverOptions;
|
||||
private MultiLineTextFieldEditor serverOptions;
|
||||
|
||||
public CPPLanguageServerPreferencePage() {
|
||||
super(GRID);
|
||||
|
@ -48,7 +49,6 @@ public class CPPLanguageServerPreferencePage extends FieldEditorPreferencePage i
|
|||
|
||||
@Override
|
||||
public void createFieldEditors() {
|
||||
|
||||
serverChoice = new RadioGroupFieldEditor(PreferenceConstants.P_SERVER_CHOICE,
|
||||
LspUiMessages.CPPLanguageServerPreferencePage_server_selector, 1,
|
||||
new String[][] {
|
||||
|
@ -62,7 +62,7 @@ public class CPPLanguageServerPreferencePage extends FieldEditorPreferencePage i
|
|||
LspUiMessages.CPPLanguageServerPreferencePage_server_path, getFieldEditorParent());
|
||||
addField(serverPath);
|
||||
|
||||
serverOptions = new StringFieldEditor(PreferenceConstants.P_SERVER_OPTIONS,
|
||||
serverOptions = new MultiLineTextFieldEditor(PreferenceConstants.P_SERVER_OPTIONS,
|
||||
LspUiMessages.CPPLanguageServerPreferencePage_server_options, getFieldEditorParent());
|
||||
addField(serverOptions);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue