Skip to content

Commit 67ae628

Browse files
committed
Fix Completion importance for package functions
Now, local variables and package functions that you defined yourself will always appear on the top of the list if they match what you have typed.
1 parent aa6c372 commit 67ae628

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/de/halirutan/mathematica/codeinsight/completion/MathematicaCompletionContributor.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
/*
2-
* Copyright (c) 2013 Patrick Scheibe
2+
* Copyright (c) 2018 Patrick Scheibe
3+
*
34
* Permission is hereby granted, free of charge, to any person obtaining a copy
45
* of this software and associated documentation files (the "Software"), to deal
56
* in the Software without restriction, including without limitation the rights
67
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
78
* copies of the Software, and to permit persons to whom the Software is
89
* furnished to do so, subject to the following conditions:
910
*
10-
* The above copyright notice and this permission notice shall be included in
11-
* all copies or substantial portions of the Software.
11+
* The above copyright notice and this permission notice shall be included in all
12+
* copies or substantial portions of the Software.
1213
*
1314
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1415
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1516
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1617
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1718
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
* THE SOFTWARE.
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
2021
*/
2122

2223
package de.halirutan.mathematica.codeinsight.completion;
@@ -34,9 +35,9 @@
3435
*/
3536
public class MathematicaCompletionContributor extends CompletionContributor {
3637

37-
public static final double LOCAL_VARIABLE_PRIORITY = 40;
38-
public static final double GLOBAL_VARIABLE_PRIORITY = 35;
39-
public static final double IMPORT_VARIABLE_PRIORITY = 30;
38+
public static final double LOCAL_VARIABLE_PRIORITY = 10000;
39+
public static final double GLOBAL_VARIABLE_PRIORITY = 9000;
40+
public static final double IMPORT_VARIABLE_PRIORITY = 8000;
4041

4142

4243
public MathematicaCompletionContributor() {

0 commit comments

Comments
 (0)