Comments (6)
Thank you for the the suggestion.
Not sure I understood it properly though. If sublime text already does this out of the box why would you want tooling-force.com
to do the same ?
Sublime is not alone - in vim tagbar
plugin does the same
I am sure I did not understand you properly, so if you could elaborate that would be helpful.
from tooling-force.com.
I just used sublime text as an example. I'm trying to bring feature parity to vscode. Unlike sublime & vim, you must explicitly provide the symbols for vscode.
There are two interfaces to do so: WorkspaceSymbolProvider
& DocumentSymbolProvider
.
While symbols for the entire workspace would be nice, I think the DocumentSymbolProvider
is more useful and likely easier to implement.
Example command would be something like this:
--action="listSymbols" --currentFilePath="/path/to/file.cls" --currentFileContentPath="/path/to/tmp.cls" --responseFilePath="path/to/response"
Output:
RESULT=SUCCESS
[
{'identify':'Foo', 'type':'class', 'line': 1},
{'identify':'Foo', 'type':'constructor', 'line': 3},
{'identify':'myProp', 'type':'property', 'line': 5},
{'identify':'doSomething', 'type':'method', 'line': 7},
{'identify':'InnerFoo', 'type':'class', 'line': 15}
]
Obviously output doesn't need to be exactly like that, but you get the idea.
Let me know if there is anything I can do to help make this happen!
from tooling-force.com.
Thank you for clarifying.
I like the idea. Thanks for the suggestion. Will look into this when I get a chance.
While symbols for the entire workspace would be nice, I think the DocumentSymbolProvider is more useful and likely easier to implement.
Result file size (for entire workspace) may be quite noticeable and generating/parsing it may add extra delay.
This does not seem to be a useful feature for CI scenarios so listSymbols
this could be first step to adding support for LSP. My only issue with that is (not being a VSCode user myself) I am not sure what communication channel VSCode actually uses.
If we were to implement listSymbols
we could just as well make it as easy to use from clients (like VSCode) supporting LSP as possible. It may even become useful in vim
later, when its LSP plugin matures enough.
Do you know much about how VSCode communicate with servers supporting LSP ?
from tooling-force.com.
I've gone through the vscode language server "Hello world" in typescript but that's about it. Most of the inner workings is abstracted away because vscode provides library support for pretty much everything.
However, Here is a LSP implementation in java (& for java) and it's corresponding vscode extension.
from tooling-force.com.
Also, here is better API Documentation for the DocucumentSymbolProvider
from tooling-force.com.
thanks for the links, this is helpful.
from tooling-force.com.
Related Issues (20)
- Idea - alternative implementation of JVM persistence for server mode HOT 2
- Привет, проект затих? HOT 1
- runTestsAsynchronous expects 3 arguments HOT 2
- Failed to create Metadata Container. duplicate value found HOT 4
- No documentation for server-mode HOT 3
- java.lang.NullPointerException while running soqlQuery action HOT 3
- Completion take long time to return HOT 10
- Optional auto-complete interface to allow input & output as string HOT 5
- Running all tests without a project path. HOT 11
- running tests synchronously doesn't terminate HOT 15
- Check Syntax not returning results HOT 1
- Add JSON output protocal HOT 4
- Rename Symbol HOT 2
- Porting grammar to Typescript HOT 10
- Retrieving FieldSets HOT 2
- Parser blows up if method names match system types HOT 2
- Canceling requests to service? HOT 9
- ApexRefreshProject and other refresh/deploy commands silently fails HOT 1
- ApexRefreshProject and other refresh/deploy commands silently fails HOT 2
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 tooling-force.com.