Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse plugin - Editor associated to file extension and perspective

I'm developing tow eclipse plugin, I have the next problem:

I have two perspective that manages the same files. I would like to make an association between file extension - editor - perspective.

I mean if I open the file extension .XXX in perspective 1 it uses the editor A, but if I open the same file extension .XXX in perspective 2, it uses the editor B.

is it possible? Since now, I used the launcher but now I need more differentiation.

Thanks.

like image 802
Rafael Avatar asked Nov 24 '25 23:11

Rafael


1 Answers

(Sorry, this is one of those "don't do that!" non-answers. :))

As mentioned in the comments, I'd recommend against opening a different editor depending on the current perspective. I think that goes against the expectations of the user, and has some unintuitive consequences, e.g. when I create my own perspectives.

I'd recommend going the path of Eclipse' XML/Plug-in manifest editors, for example. Tabs at the bottom allow the user to choose between the different views, independent of any perspective choice or configuration.

Eclipse plugin-in manifest editor

like image 178
Henrik Heimbuerger Avatar answered Nov 28 '25 09:11

Henrik Heimbuerger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!