Comments (4)
No, it must do all of the server. Server analyzed the source, it has type information and expression information and you need to implement it using it.
Contributions are extremely welcome !
Thanks.
from meghanada-server.
Got the thoughts, that's reasonable design, I will try to implement it.
Then we can discuss on how to handle basic completion and smart completion and make them work at the same time.
Thanks.
from meghanada-server.
@mopemope Would you please help to review the pull request and offer your thoughts
Client side:
mopemope/meghanada-emacs#102
Server side:
#61
Basically in order to make it easier for end user, I have combine the so called "smart completion" and normal completion together through implement a custom comparator for CandidateUnit, and offers higher rank for those with exactly same return type with the variable/field to be assigned.
The current implementation logic is:
For the follow code fragments
String a = "";
int i = a. //<-- Cursor position
String a = "";
int i = 0;
i = a.//<-- Cursor position
public class A {
private int intMember;
private void aMethod() {
String a = "";
intMember = a. //<-- Cursor position
}
}
then all methods of String class with return type of int
will be list before other methods.
Current support:
- class member assignment
- local variable assignment
Note:
- For code fragment 2 and 3, the buffer needs to be saved first for the meghanada-server to generate correct output, otherwise the return list will be same as current.
- For code fragment 1, I will sent the type information(int) directly from Emacs to server side for it to do match, so there's no need to save the buffer.
Thanks :)
from meghanada-server.
Already added generic support for the smart completion of assignment.
from meghanada-server.
Related Issues (20)
- Test failure with Java 11: 93% successful HOT 1
- downloadJar needs to handle the case where it fails HOT 1
- exclude-file broken in .meghanada.conf HOT 1
- dev branch: downloads Gradle HOT 1
- Downloads despites the jar is in /home/vertx/.emacs.d/meghanada HOT 1
- Exception in thread "pool-3-thread-1" java.lang.NoClassDefFoundError: Lcom/sun/source/tree/LineMap; HOT 3
- Cannot run program "mvn" HOT 1
- string index out of range, then consumes all of my CPU
- Error thown when building: No .git directory found! HOT 1
- Java 8 test failures HOT 1
- Windows XP - C:\Documents File Not Found HOT 3
- Question : set project root ? HOT 3
- java.lang.IllegalArgumentException when running server HOT 3
- java.nio.file.AccessDeniedException HOT 1
- Unrecognized VM option 'UseConcMarkSweepGC' when trying to execute main class.
- Dependency Dashboard
- OpenBSD Not Supported HOT 3
- Cut a new release for log4j fix HOT 1
- Bump Log4j to 2.17.1 HOT 1
- Error compiling file with junit dependency in gradle project HOT 1
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 meghanada-server.