summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2018-07-23 01:01:27 -0400
committerNathan Ridge2018-07-25 01:49:30 -0400
commit0127ad7c935bd458ef9ccd57ea554942ee402de1 (patch)
tree22d40c5e7bfc6fc1449aef3899c0a944b078d7fa
parent4cf155d79f0bc52ce58b6e2683db877b5b03027a (diff)
downloadorg.eclipse.cdt-0127ad7c935bd458ef9ccd57ea554942ee402de1.tar.gz
org.eclipse.cdt-0127ad7c935bd458ef9ccd57ea554942ee402de1.tar.xz
org.eclipse.cdt-0127ad7c935bd458ef9ccd57ea554942ee402de1.zip
Remove lsp4e-cpp code related to the unused 'reindex' command
This code was mostly commented out and non-functional anyways. Change-Id: Ib0713a1c419438c0973bac49d4bb1786517914ff
-rw-r--r--lsp4e-cpp/org.eclipse.lsp4e.cpp.language/plugin.xml56
-rw-r--r--lsp4e-cpp/org.eclipse.lsp4e.cpp.language/src/org/eclipse/lsp4e/cpp/language/LanguageServerPropertyTester.java44
-rw-r--r--lsp4e-cpp/org.eclipse.lsp4e.cpp.language/src/org/eclipse/lsp4e/cpp/language/ReindexHandler.java60
3 files changed, 0 insertions, 160 deletions
diff --git a/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/plugin.xml b/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/plugin.xml
index 5e1621c5a5..8816ee5b2b 100644
--- a/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/plugin.xml
+++ b/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/plugin.xml
@@ -39,62 +39,6 @@
</presentationReconciler>
</extension>
<extension
- point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.lsp4e.cpp.language.commands.reindex"
- name="%reindex.command.name">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.lsp4e.cpp.language.ReindexHandler"
- commandId="org.eclipse.lsp4e.cpp.language.commands.reindex">
- <activeWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <test
- forcePluginActivation="true"
- property="org.eclipse.lsp4e.cpp.language.hasServer"
- value="org.eclipse.lsp4e.languages.cpp">
- </test>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.ui.popup.any?after=additions">
- <command
- commandId="org.eclipse.lsp4e.cpp.language.commands.reindex"
- label="%reindex.command.label"
- style="push">
- <visibleWhen
- checkEnabled="true">
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.lsp4e.cpp.language.LanguageServerPropertyTester"
- id="org.eclipse.lsp4e.cpp.language.propertyTester"
- namespace="org.eclipse.lsp4e.cpp.language"
- properties="hasServer"
- type="java.lang.Object">
- </propertyTester>
- </extension>
- <extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.lsp4e.cpp.language.CPPLanguageServerPreferencePage"
diff --git a/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/src/org/eclipse/lsp4e/cpp/language/LanguageServerPropertyTester.java b/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/src/org/eclipse/lsp4e/cpp/language/LanguageServerPropertyTester.java
deleted file mode 100644
index 80fa5e3c5f..0000000000
--- a/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/src/org/eclipse/lsp4e/cpp/language/LanguageServerPropertyTester.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 Ericsson and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.lsp4e.cpp.language;
-
-import java.io.IOException;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.lsp4e.LanguageServersRegistry;
-import org.eclipse.lsp4e.LanguageServersRegistry.LanguageServerDefinition;
-import org.eclipse.lsp4e.LanguageServiceAccessor;
-import org.eclipse.lsp4e.ProjectSpecificLanguageServerWrapper;
-
-/**
- * Tests whether of not a project is running the C/C++ server.
- */
-public class LanguageServerPropertyTester extends PropertyTester {
-
- private static final String KEY_HAS_SERVER = "hasServer"; //$NON-NLS-1$
-
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- //FIXME; needs https://git.eclipse.org/r/#/c/101835/
-// if (KEY_HAS_SERVER.equals(property)) {
-// if (receiver instanceof IProject) {
-// LanguageServerDefinition definition = LanguageServersRegistry.getInstance().getDefinition(CPPLanguageServer.ID);
-// try {
-// ProjectSpecificLanguageServerWrapper lsWrapperForConnection = LanguageServiceAccessor.getLSWrapperForConnection((IProject) receiver, definition, false);
-// return lsWrapperForConnection != null;
-// } catch (IOException e) {
-// return false;
-// }
-// }
-// }
- return false;
- }
-
-}
diff --git a/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/src/org/eclipse/lsp4e/cpp/language/ReindexHandler.java b/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/src/org/eclipse/lsp4e/cpp/language/ReindexHandler.java
deleted file mode 100644
index 0c30749735..0000000000
--- a/lsp4e-cpp/org.eclipse.lsp4e.cpp.language/src/org/eclipse/lsp4e/cpp/language/ReindexHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 Ericsson and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.lsp4e.cpp.language;
-
-import java.io.IOException;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Adapters;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.lsp4e.LanguageServersRegistry;
-import org.eclipse.lsp4e.LanguageServersRegistry.LanguageServerDefinition;
-import org.eclipse.lsp4e.LanguageServiceAccessor;
-import org.eclipse.lsp4e.ProjectSpecificLanguageServerWrapper;
-import org.eclipse.lsp4j.ExecuteCommandParams;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Temporary handler for temporary command in order to aid testing the indexing
- * support in Clangd.
- */
-public class ReindexHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- //FIXME; needs https://git.eclipse.org/r/#/c/101835/
-// IProject project = null;
-// ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
-// if (selection instanceof IStructuredSelection) {
-// Object item = ((IStructuredSelection)selection).getFirstElement();
-// project = Adapters.adapt(item, IProject.class);
-// }
-// if (project == null) {
-// return null;
-// }
-//
-// LanguageServerDefinition definition = LanguageServersRegistry.getInstance().getDefinition(CPPLanguageServer.ID);
-// try {
-// ProjectSpecificLanguageServerWrapper lsWrapperForConnection = LanguageServiceAccessor.getLSWrapperForConnection(project, definition, false);
-// if (lsWrapperForConnection != null) {
-// ExecuteCommandParams params = new ExecuteCommandParams("reindex", null);
-// lsWrapperForConnection.getServer().getWorkspaceService().executeCommand(params);
-// }
-// } catch (IOException e) {
-// return false;
-// }
-
- return null;
- }
-
-}