Closed giulio12 closed 10 years ago
The TypeScript plug-in mostly relies upon the TypeScript services for this feature. Here is the information provided by their services:
export class CompletionInfo {
public maybeInaccurate = false;
public isMemberCompletion = false;
public entries: CompletionEntry[] = [];
}
export interface CompletionEntry {
name: string;
kind: string; // see ScriptElementKind
kindModifiers: string; // see ScriptElementKindModifier, comma separated
}
export interface CompletionEntryDetails {
name: string;
kind: string; // see ScriptElementKind
kindModifiers: string; // see ScriptElementKindModifier, comma separated
type: string;
fullSymbolName: string;
docComment: string;
}
The initial service call returns a CompletionInfo and then its possible to call back in for the CompletionEntryDetails. The current plug-in code immediately gets all the details because type is used in the labels for the drop-down. It may be possible to get this information lazily but I'd have to do more investigation. It also may be possible get the type information included in CompletionEntry by asking the TypeScript team to make a change. I'm not sure how much these changes would improve performance but its a possibility.
Another path is to check out the latest 'develop' version of the plug-in. There has been a bunch of performance work done in the 'develop' branch of TypeScript services for the 0.9.5 release. Can you try out the matching 'develop' version of the Eclipse plug-in? The instructions for installing it are the bottom of this page: https://github.com/palantir/eclipse-typescript/wiki
Seems to work now.... Autocomplete works and eclipse does not get stuck... Even though sometime seems to have some minor slowdowns (which probably you could get rid of by loading information lazily, as you said) the plugin now works. Thank you
Cool. What changed? Did you switch to the develop version or did the issue just clear up on its own?
I switched to the develop version :)
Ok awesome. If you have automatic updates enabled, you'll want to remove the normal update site from your sites list otherwise you'll be downgraded to the 0.9.1.1 release since it's matching plugin has a higher version number (1.0.0). I'm fixing the versioning for the develop branch by downgrading the version number to match TypeScript's versioning scheme. I'm doing this to intentionally break automatic updates when 0.9.5 comes out because it was hugely disruptive in our testing (it introduces a lot of fixes which fine many more compiler errors). I don't want people to be surprised by getting the new version automatically and then have no choice but to use the new version.
I've issues with the performance when using multiple definition files. Eclipse get stuck when trying to use the autcomplete (or when it is used automatically) with two or more long definitions (from large libraries), this results in long waitings while writing the code. In my project I use jQuery and sugar.js.
sugar.d.ts : https://github.com/jbaldwin/sugar.d.ts jquery.d.ts : https://github.com/borisyankov/DefinitelyTyped/blob/master/jquery/jquery.d.ts
Eclipse Version: Kepler Service Release 1 TypeScript plugin: 1.0.0.v20131023-1704 com.palantir.typescript.feature.feature.group Palantir Technologies, Inc. Typescript version: 0.9.1.2 Node version: v0.10.20