|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2016, 2023 Pivotal, Inc. |
| 2 | + * Copyright (c) 2016, 2024 Pivotal, Inc. |
3 | 3 | * All rights reserved. This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License v1.0 |
5 | 5 | * which accompanies this distribution, and is available at |
|
8 | 8 | * Contributors: |
9 | 9 | * Pivotal, Inc. - initial API and implementation |
10 | 10 | *******************************************************************************/ |
11 | | - |
12 | 11 | package org.springframework.ide.vscode.boot.properties.completions; |
13 | 12 |
|
14 | 13 | import static org.springframework.ide.vscode.boot.common.CommonLanguageTools.SPACES; |
@@ -366,12 +365,14 @@ protected Collection<ICompletionProposal> getFuzzyCompletions() { |
366 | 365 | } |
367 | 366 |
|
368 | 367 | private Collection<ICompletionProposal> elideCommonPrefix(String basePrefix, ArrayList<ICompletionProposal> proposals) { |
369 | | - String prefix = StringUtil.commonPrefix(Stream.concat(Stream.of(basePrefix), proposals.stream().map(ICompletionProposal::getLabel))); |
370 | | - int lastDot = prefix.lastIndexOf('.'); |
371 | | - if (lastDot>=0) { |
372 | | - for (int i = 0; i < proposals.size(); i++) { |
373 | | - ICompletionProposal p = proposals.get(i); |
374 | | - proposals.set(i, p.dropLabelPrefix(lastDot+1)); |
| 368 | + if (false) { // TODO: check for preference setting |
| 369 | + String prefix = StringUtil.commonPrefix(Stream.concat(Stream.of(basePrefix), proposals.stream().map(ICompletionProposal::getLabel))); |
| 370 | + int lastDot = prefix.lastIndexOf('.'); |
| 371 | + if (lastDot>=0) { |
| 372 | + for (int i = 0; i < proposals.size(); i++) { |
| 373 | + ICompletionProposal p = proposals.get(i); |
| 374 | + proposals.set(i, p.dropLabelPrefix(lastDot+1)); |
| 375 | + } |
375 | 376 | } |
376 | 377 | } |
377 | 378 | return proposals; |
|
0 commit comments