Eclipse: how to change into the correct perspective automatically when editing a file?
I want to configure Eclipse to change into the appropriate perspective automatically when I open a file for editing. For example if I am in Java perspective and open a MXML or ActionScript file then I want the perspective to change automatically to the FlashBuilder 开发者_开发百科perspective . Then if I reopen the Java file for editing it should switch back to the Java perspective .
I think I remember seeing a prompt asking if this should be the default behavior when I first installed Eclipse, and now I wish I had accepted that. I can't find anything in the settings which allow me to configure this behavior. Is it possible, and if so how?
I am running Eclipse Helios Release 2 on a Windows machine.
If you go into preferences -> general -> Editors -> File Associations, you can define the editor to associate with a given file.
I don't know if -- by mode -- you mean perspective, or view (editor).
Edit: What other information were you looking for? Does this not answer your questions?
Currently there is no native way that I know of (Eclipse 4.2.0). But you can use this plugin that works like a charm for my needs:
http://www.richinternet.de/blog/index.cfm?entry=1758AACF-910C-DE52-368E1421BEFDA19B
Go to Preferences -> General -> Perspectives and then you have the option to "Open the associated perspective when creating a new project" set it to "Always open".
Ctrl+Shift+F8---->you can change the perspective alternatively.This shortcut also may be helpful to you
I just want to help @Piotr Dobrogost and @Tom Brito,
But I can not write the reply cause don't have enough reputation.
Then I write down on new comment:
1. You can access link http://www.richinternet.de/blog/
2. Then select Menu "Plugins", and roll down util to the title "New Perspective Switcher Plugin version"
Or you can access the link: http://www.richinternet.de/blog/index0d2c.html?mode=cat&catid=79CCCF13-928B-FB2B-96BD8FE9AFA1FC47
File name: de.richinternet.plugins.perspectiveswitcher_0.1.1.jar
After download, I extract to dropins folder of eclipse (Version: 4.3.2)
This is capture of result:
Hope it usefull, thanks !
精彩评论