Giter Club home page Giter Club logo

Comments (11)

neowit avatar neowit commented on June 7, 2024

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.

neowit avatar neowit commented on June 7, 2024

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.

TaDaa avatar TaDaa commented on June 7, 2024

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.

neowit avatar neowit commented on June 7, 2024

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.

TaDaa avatar TaDaa commented on June 7, 2024

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.

neowit avatar neowit commented on June 7, 2024

Interesting....
What does :ApexToolingVersion command returns?

from vim-force.com.

TaDaa avatar TaDaa commented on June 7, 2024
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.

neowit avatar neowit commented on June 7, 2024

You have surprising memory numbers. Perhaps it is a windows thing but I would expect these to be much higher.

  1. What java version you have?
  2. 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 of str.
    If completion does not work then let me know what :ApexToolingVersion showed.
  3. 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:
screenshot_2014-12-17_at_20 27 57

from vim-force.com.

TaDaa avatar TaDaa commented on June 7, 2024
  1. JDK 1.7.0_71
  2. 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
  1. 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.

neowit avatar neowit commented on June 7, 2024

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.

TaDaa avatar TaDaa commented on June 7, 2024

Success! Thank you for getting this working on Windows and the great plugin!!

from vim-force.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.