Comments (25)
it could be easy solution just to integrade dcd into app - run it in separate thread and pass parameters and get result directly in D code.
DCD might be modified to be able building as library with communication and interface related stuff stripped out.
But there is a big problem: it's licensed under GPL3 - and incompatible with Boost license IMHO.
from dlangide.
important to note is, that since DCD parses the code itself one needs to save unsaved changes in the file in a tmpfile to have DCD parse it, which should not be a problem and be significantly easier and safer than integrating libdparse yourself. SOA for the win ;)
dcd-client accepts input from a file or stdin. Saving to a temporary file is not necessary.
from dlangide.
Even better!!
On Tue, Feb 10, 2015 at 11:22 PM, Brian Schott [email protected]
wrote:
important to note is, that since DCD parses the code itself one needs to
save unsaved changes in the file in a tmpfile to have DCD parse it, which
should not be a problem and be significantly easier and safer than
integrating libdparse yourself. SOA for the win ;)dcd-client accepts input from a file or stdin. Saving to a temporary file
is not necessary.—
Reply to this email directly or view it on GitHub
#20 (comment).
from dlangide.
So back to running it as a seperated process
from dlangide.
How would I display the suggestions?
from dlangide.
maybe a popup menu ?
see example of dlangui for that: https://github.com/buggins/dlangui/blob/master/examples/example1/src/example1.d#L287
but maybe another dedicated window for this would be more appropriate
from dlangide.
while icon + text is enough, we can use popup menu
from dlangide.
are you planning to run dcd-client executable to invoke dcd?
I think we can just use sockets to connect to dcd directly.
from dlangide.
Yup, as it currently stands I'm using dcd-client to communicate with dcd-server. Having a look at dcd-client source code it shouldn't be hard to replicate its behaviour.
At the moment I'm just finishing up the basic auto completion part and then I'll send a pull request so that the code can be reviewed.
from dlangide.
Merged pull request and as well did some refactoring and improvements.
from dlangide.
You forgot to upload dcd-client.exe.
from dlangide.
Yes, thanks. Will submit it tomorrow. So far you can build it yourself.
from dlangide.
Experimenting with direct using of libdparse
from dlangide.
Ah, that would definitely work much better than using it indirectly through dcd.
from dlangide.
So far, I'm trying to implement GoToDefinition feature with libdparse.
from dlangide.
I am going to improve dub support of that libparse and related packages. I have registered dub packages for libparsed, dsymbol and dcd. I guess that will it make it easer to integrate them.
i integrated DCD via dub without that client/server stuff
#88
it reduces the about of code needed to communicate with DCD and makes the hole thing a lot simpler, also it's now easier to follow/debug directly into DCD and DCD is automatically available without any manual steps for the user.
@buggins I saw that you started to prepare some even better integration - i just wanted to say that my changes may make it easier for that kind of implementation because it's more similar.
from dlangide.
Let's use your DCD integration implementation so far.
from dlangide.
Fixed VisualD and Mono-D projects for new DCD integration.
README is updated with dependency cloning instructions
from dlangide.
BTW, code completion and finding references doesn't work for me
from dlangide.
It stopped working for me too (linux) , i have some ideas what it could be (working path, modulecache, dependencies...). I checked the code from dcd server.d which is NOT used by dlangide and the only difference i found was that it sets a loglevel and changes the working directory - (and it does not set a logger). Maybe we need to set the working directory to something specific before calling DCD (seems it makes differece if it runs in linux or windows). Sorry for all the trouble...
from dlangide.
Fixed problem with new DUB version today.
It looks like new DUB fetches dependencies into subdirectories.
As a result, dlangide did not find dependency projects.
from dlangide.
Reproduced non-working GoToDefinition in single file project.
In some cases position is determined wrongly.
Source lines:
auto foo = new Foo();
writeln("Hello World!");
DlangIDE log:
2016-01-12 10:43:10.425 D DCD Context: oo = new F|oo();
2016-01-12 10:43:10.426 D DCD fileName:
DCD log:
2016-01-12T10:41:14.039:..\DCD\src\server\autocomplete.d:getSymbolsByTokenChain:743 Could not find declaration of "Hello World!" from position 240
2016-01-12T10:41:14.039:..\DCD\src\server\autocomplete.d:findDeclaration:135 Could not find symbol declaration
DCD looks up symbol one line lower than expected by DlangIDE
from dlangide.
I'm pretty sure that this isn't a DCD bug because all the other editor plugins work.
from dlangide.
Unfortunately I cannot reproduce it anymore since I modified source and did not save original.
Now it's working ok.
from dlangide.
Closing this issue since DCD integration seems done
from dlangide.
Related Issues (20)
- Only able to open release build in a terminal. HOT 2
- Too many errors to count. You pick and choose. HOT 2
- 0.8.17 Build fails with DMD on Windows 10 HOT 3
- "Try DlangIDE" very long building time and unsuccessful every time. HOT 3
- latest d failed to compile on win 64 bits HOT 2
- It's time to upgrade the code
- Project template "DlangUI hellow world app" does not compile under ubuntu 18.04 HOT 1
- linking failed , Windows 7 ,32bit HOT 9
- Linking problem with sdl2
- Any tutorial on how to use this IDE in Windows ?
- Can't build dlangide with dmd 2.090.1 HOT 1
- Updates
- Command `dub run --build=release dlangide` failed entirelly! HOT 5
- `dub run --build=release dlangide` has compile-time errors. HOT 6
- MacOS Monterey - build failed
- Color Rendering on FreeBSD PowerPC64 (Big Endian) HOT 1
- build error on dmd-2.099.1 HOT 2
- MacOS Ventura Build Failed HOT 3
- sharedLog = new NullLogger() 64bit build compile error with dlangui0.10.2+dmd2.103 under win10 HOT 3
- source editor cann't input utf8 charactor 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 dlangide.