Everlaw / nbts

NetBeans TypeScript editor plugin
283 stars 46 forks source link

Please add support to jump to code behind of component #82

Open Chris2011 opened 7 years ago

Chris2011 commented 7 years ago

I have a component called app-label-list. Inside the html it looks like this:

<app-label-list></app-label-list>

in WebStorm it is possible to ctrl + click on the tag name and it will jump into the .ts file. This is very handy and in my opinion a must have that the TypeScript plugin could handle this too. I use TS with Angular2. I created a new project with the angular-cli and I have a label-list folder for this component.

Regards

Chris

jeffrey-easyesi commented 7 years ago

There's no way for nbts to know that some TS code is associated with some custom element name, since any such association is going to be by means specific to the particular framework being used. I don't think a third-party plugin can extend the HTML editor's go-to-definition functionality anyway.

Chris2011 commented 7 years ago

but <app-label-list> is associated to the component with the selector that matches and this is app-label-list. I think you have to search each .ts file to find the name which matches.

What other solution you think should work? Native implementation? In the angularJS sometimes it works, that you jump to the variable inside the view file and this should work in the nbts too. But I didn't test it yet.

Chris2011 commented 7 years ago

Atm it is also not possible to ctrl + click {{title}} inside a view to jump into the .ts code behind, which should be possible. AngularJS 1 was handled sometimes inside NetBeans with this feature. Not proper but it worked. The label-list.component.html is encoupled with the label-list.component.ts and vice versa. For example.