Comments (7)
I assume this should say "When editor is saved" instead of "When completion is done"?
from tern.java.
I assume this should say "When editor is saved" instead of "When completion is done"?
No. Today when completion, hyperlink, hover is done, the full JS content coming from the editor is posted to the tern server ("full" type is used for that).
With tern it's possible to post a "partial" JS content to execute completion, hyperlink, hover. This feature is interesting when the editor has a big JS. See http://ternjs.net/doc/manual.html and search "part"
from tern.java.
The completion with big file file like ember.js doesn't work because timeout is every time thrown because it takes too time to analyze the file.
If you take the demo http://ternjs.net/doc/demo/#simple and you copy/paste ember.js, teh first time completion is slow and teh second time it is fast, because it uses "part" file.
To add this feature inside tern.java, we need to know the start and end offset where update was done. To do that we must add a listener for IDocument to track sart + end offset.**My idea is to use TernDocumentFile and have ONE instance per editor of TernDocumentFile to add adocument listener to track start/end offset of the update (today we create an instance each time for completion, hyperlink)
@piotrtomiak are you OK to have ONE instance of TernDocumentFile per editor?
from tern.java.
@angelozerr - I have done support for part files through comparison. I will update you on whether we can contribute this.
from tern.java.
@piotrtomiak I'm sorry I have not understood? You have already implemented tern file "part" (see http://ternjs.net/doc/manual.html) instead of "full" (like today?). If it that and you can contribute it, it should really fantastic, otherwise I will implement it and are you OK to have ONE instance of TernDocumentFile per editor?
from tern.java.
@angelozerr yeah, exactly. Not much coding :) I will create PR soon, today or tomorrow morning.
from tern.java.
@angelozerr yeah, exactly. Not much coding :) I will create PR soon, today or tomorrow morning.
Wow, very cool! I'm very exciting with your PR:) Thanks!
from tern.java.
Related Issues (20)
- java.lang.RuntimeException: java.lang.NullPointerException HOT 6
- Errors when selecting some JS modules in project properties
- No type hinting
- Trouble installing Tern 1.2.0 and 1.3.0 Snapshot on Eclipse Luna HOT 1
- Tern IDE not working with Spring's STS HOT 4
- Unable to install with eclipse neon.3 HOT 6
- Feature request: async/await support HOT 5
- how to remove the function reference of the content assist?
- Upgrade to tern 0.21
- The console does not appear in the Tern project property, HOT 1
- NullPointerException TernOutlineContentProvider.java:182 HOT 3
- How about embed the latest version of node.js?
- latest ESLint support. HOT 3
- Support for navigator.getUserMedia HOT 1
- “Error while launching client file ,Cannot find node install path node-native” wrt protractor in eclipse
- Error why installing tern eclipse plugin in eclipse photon
- nodeclipse auto-complete not working on installed packages (aws-sdk) // Tern.java?
- Can't install Tern Eclipse IDE on Eclipse 4.10
- add react module HOT 1
- tern of eclipse not dose work that calculating completion proposals… 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 tern.java.