Comments (11)
RESULT=SUCCESS and otherwise empty file means that parser did not understand the code.
Code completion is work in progress (and always will be) as there are too many ways to write a piece of code in such a way that parser does not understand it.
Can you create/share an example of the code where completion does not work?
Ideally if you could share the whole file (minimised to the point where completion still does not work, but all unrelated stuff is removed). If more than one file is involved then I need the related one as well.
Are you running tooling-force.com in legacy or server mode?
from vim-force.com.
one more thing - does completion not work for you at all or only in a specific case? (above I assumed that you found a specific case, but then realised that I might have made an incorrect assumption)
If you create a new file/class with the following content:
public with sharing class A_Fake_Class {
void test1() {
System.<cursor>
}
}
(obviously no need to write above)
Then put your cursor where it says and call completion.
What happens? Do you get a list?
from vim-force.com.
I see. Thank you for the quick followup!
System. results in a list.
Was trying the example:
String str= "abc";
str. and nothing appears
from vim-force.com.
do you get nothing if you try str.
completion in the new file which contains only this :
public with sharing class A_Fake_Class {
void test1() {
String str= 'abc';
str.
}
}
?
Or above works and you get nothing in your own file with larger content?
If latter then it must be related to the structure of your particular file. Please share an example.
from vim-force.com.
Made a new file with
public with sharing class A_Fake_Class {
void test1() {
String str= 'abc';
str.
}
}
and do not see completions for str.
---
response_listCompletions shows RESULT=SUCCESS
CLI - server command to tools:
received command: --action=listCompletions --tempFolderPath="C:\users/user\f
orce\temp" --config="C:\users\user\force\Warehouse.properties" --projectPath=
"C:\temp\projects\Warehouse" --column=8 --line=4 --currentFilePath="C:\temp\pr
ojects\Warehouse\src\classes\A_Fake_Class.cls" --currentFileContentPath="C:\User
s\user\AppData\Local\Temp\VIU42C0.tmpA_Fake_Class.cls" --responseFilePath="C:
\temp\projects\Warehouse\.vim-force.com\response_listCompletions" --pollWaitMil
lis=1000 --maxPollRequests=1000
Disconnect /127.0.0.1:64518
reference temp file:
public with sharing class A_Fake_Class {
void test1() {
String str= 'abc';
str.
}
}
from vim-force.com.
Interesting....
What does :ApexToolingVersion
command returns?
from vim-force.com.
working ...
[INFO] # Time take 0.01s
tooling-force.com - version: 0.3.1.3; SFDC API Version 32.0
Used Memory: 9 MB
Free Memory: 6 MB
Total Memory: 15 MB
Max Memory : 247 MB
from vim-force.com.
You have surprising memory numbers. Perhaps it is a windows thing but I would expect these to be much higher.
- What java version you have?
- can you try and kill the server
:call apexTooling#serverShutdown()
and then set
:let g:apex_tooling_force_dot_com_java_params = "-Xms128m -Xmx1024m"
then call:ApexToolingVersion
(record the results) and then try completion ofstr.
If completion does not work then let me know what:ApexToolingVersion
showed. - Also (just a shot in the dark) can you check the last modified date of response file
C: \temp\projects\Warehouse\.vim-force.com\response_listCompletions
? Does it correspond with the time when you run the completion? (just want to make sure that it is not a security issue and tooling-force.com.jar can actually modify this file on you machine every time it is called)
FYI - when I call completion (Ctrl-X-O
) on str.
I get this:
from vim-force.com.
- JDK 1.7.0_71
- No completions -- ApexToolingVersion now shows:
working ...
[INFO] Executor - # Time Taken: 0.0s
tooling-force.com - version 0.3.1.3; SFDC API Version 32.0
Used Memory: 22 MB
Free Memory: 101 MB
Total Memory: 123 MB
Max Memory: 989 MB
- Last modified times are updating each completion.
Took some work but I was able to get the tooling jar to build on windows -- will see if I can provide you with more debug info.
from vim-force.com.
It turns out that on my Win 7 VM code completion does not work at all. Not sure why for you System.
example worked. In my test both System.
and str.
completions with version 0.3.1.3 resulted in exception (visible in tooling-force.com server window). Not sure if this is related to java version or Win 7 (on Win XP I did not observe this issue).
Anyway, please try this version (0.3.1.4a)
As usual, run :ApexToolingVersion
first, to make sure you are testing the right .jar.
Then try that fake class file with str.
and Ctrl-X-O
completion.
from vim-force.com.
Success! Thank you for getting this working on Windows and the great plugin!!
from vim-force.com.
Related Issues (20)
- Cannot run scripts other than :ApexInitProject before running this script HOT 4
- [Question] Is it possible to check what org am I currently using? HOT 3
- [Question] Is it possible to know remote changes author? HOT 2
- Code Syntax Highlighting for files with extension `*.apxc`? HOT 1
- ApexRefreshProject do not download my new CustomSetting HOT 2
- can not run test for specific method HOT 2
- :ApexExecuteAnonymous: show some error for ~100 milliseconds HOT 3
- ApexTestWithCoverage open buffer with incorrect data HOT 3
- :ApexTest - is it possible to skip `Select Log Type to change`? HOT 1
- Auto-completion doesn't work HOT 7
- incorrect syntax highlight HOT 1
- Unable to refresh projects and files (Unexpected end-of-input) HOT 8
- Commands Fail Silently If Another Process Already Bound to Server Port HOT 3
- sfdx support HOT 1
- Unknown function HTMLIndent HOT 12
- Is there an option for force refresh of file. ApexRefreshFile doesn't support "!" like ApexDeploy! ? HOT 2
- Is ApexTListToggle deprecated? HOT 2
- ApexTestWithCoverage fails with below error. My Deploy/Refresh commands don't have any issues HOT 3
- Autocomplete is slow. HOT 2
- LWC support (in non-sfdx projects) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-force.com.