-
Notifications
You must be signed in to change notification settings - Fork 14
Editor Features
typescript.java uses the JSDT Editor
to support TypeScript
, JSX
, (and JavaScript
with Salsa) by consumming tsserver
coming from TypeScript bundle.
Here a demo with TypeScript completion:
Templates are available:
- for TypeScript:
- for React
You can import, update templates with JavaScript / TypeScript / Editor / Template
preferences page:
Since TypeScript 2.1.0
, TypeScript provides Open implementation
feature that you can use with Ctrl+T
:
TypeScript editor content can be folded. For having good performance, the folding strategy doesn't use the TypeScript AST (to fold function, etc) but fold the code according the indentation (like VSCode):
You can format your TypeScript code with Ctrl+Shift+F
or use the menu Source/Format
. The formatting behaviour is done by calling format
command of the tsserver. If you find a bug, with formatting, please check with VSCode if it has the same problem.
By default, editor and formatter options uses the default config of tsserver. But if you wish you can configure editor and formatter options for TypeScript editor with TypeScript / Editor / Formatter
project preferences:
When you select a variable, method, type, etc, TypeScript editor is able to mark occurrences
:
Please note that mark occurrences
is done asynchronously in order to avoid freezing Eclipse. It means that with a big project, the mark occurrences
doesn't work as long as tsserver is not initialized.
You can find references (for a method, property, etc) in project with Ctrl+Shift+G
or use the menu References/Project
Please note that today it exists a bug when tsserver is not started, search returns none result. Please do Ctrl+Shift+G
several times by waiting fix for issue 46.
Standard Outline
is filled with TypeScript elements:
Please note that this outline is filled asynchronously to avoid freezing Eclipse. For large project, this outline can takes time.
Link With Editor
(which is available by default) gives the capability to synchronize the cursor of the active TypeScript editor with the outline to select the well tree item:
Collapse All
action gives the capability to collapse all the tree of the outline:
You can search quickly classes, methods, etc with the Quick Outline
available with with Ctrl+O
or use the menu Navigate/Quick Outline
.
Please note that this quick outline share the same TypeScript elements than Outline. It is filled when Outline is filled.
By default you can see TypeScript, JavaScript errors when you are typing :
When you activate compile/build on save, you will see problem with TypeScritpt compilation:
Since TypeScript 2.1.4
, TypeScript provides several code fixes
You can rename TypeScript symbol:
Since TypeScript 2.4.1, tsserver provides a refactoring support which will be improved in each TypeScript version. TypeScript 2.4.1 provides one Refactoring support available only for JavaScript file:
This refactoring support is available with Menu / Refactoring. In the future we will have more support.
- TypeScript IDE
- New and Noteworthy