//richinternet.blog

Viewing By Entry / Main
Thursday, November 4, 2010
Perspective Switcher Plugin for Eclipse / Flash Builder

Update: current version is 0.1.1 - read below

In my projects, I tend to work with more than one language inside Eclipse. Sometimes it's up to four but typically at least two (e.g. Java and Flex). One thing that always annoyed me inside Eclipse is, that it does not automatically switches perspectives based on the current language (or IDE plugin). So I always end up in the wrong perspective, seeking for a certain view or getting nuts because some key bindings overlap and do something different in one perspective than in another one. Know the pain? Here's the meds :)

I'm happy to introduce Perspective Switcher, a simple plugin for Eclipse (3.4 and above) which automatically switches perspectives for you based on the rules you define. It is not specific to Flash Builder at all and should work fine with *any* perspectives inside Eclipse.

Also, as of version 0.1.1, the Plugin will now automatically switch back from a Debug perspective to the previous non-Debug perspective as soon as the Debug session is terminated (yeah!). This feature is enabled by default but can be explicitly switched on and off in the Preferences page (but you don't really want to switch it off I promise) - again, this feature should work with *any* Debuggers inside an Eclipse distro as long they are built around Eclipse's DebugPlugin API.

Essentially, in the preferences page the plugin lists all active perspectives in your distribution and allows to specify which file extensions should be associated to them:

There's no validation on the extensions and you can also assign one extension to more than one perspective but the plugin will only pick the first perspective it finds.

Also, when testing I found that changing perspectives when in a Debug perspective is probably not a good idea, so all Debug perspectives are not shown in the list.

The plugin only switches perspectives when an Editor (e.g. JDT's Java Editor or Flash Builders MXML Editor) gets activated, either by opening a file or by switching from one open editor to another (by whatever means).

To install, simply unzip the ZIP file and copy the JAR into your distributions /plugins /dropins folder. Then restart Eclipse / FB with the -clean switch. You should then see the "Perspective Switcher" entry on the Preferences dialog.

Current version is 0.1.1 - Download the ZIP file here.

Enjoy!

Dirk.

Comments

Really nice and helpful plugin! this is going to save me lots of clicks at the end of the day!


Hi Xavi,

glad you like it :)

Dirk.


Hi, I tried this out but it's still not switching back to the Java perspective after debugging has terminated. Any ideas? I'm running Eclipse 3.6 if that matters.


Hi. Does the plugin preferences page show up when you go to the Eclipse / FB Preferences?


Could you open source the plug-in? Maybe creating a Google Code, Sourceforge, yourfavoriteprojecthostinghere? Thanks


Sweet! Thank you.


This is EXACTLY what I was looking for! Many thanks.


The download link doesn't work. And I'd reeeeallly like this plugin :)


Thanks for creating and sharing this plugin. It works as advertised for me, and is just what I was looking for. Kudos!


I was really surprised to see that, for a complicated IDE with separate perspectives for Java/C++, it is not smart enough to tell what .java and .cpp means! Working on a Java + C++ project, I constantly had to switch back and forth just to get the "Build" button back for C++. Thanks to you I no longer have to, it's working flawlessly. Thank you very much!!! :)

PS: Perhaps it should have ".c .cpp .h" set as default for the C/C++ perspective?




Sun Mon Tue Wed Thu Fri Sat
   1234
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

About this blog
www.aws-blog.de
www.richinternet.de
www.flexforum.de
www.die-flexperten.de

AIR (10)
Apollo (3)
BlazeDS (8)
Breeze (1)
Central (5)
Cocoon P2P (1)
ColdFusion (55)
Flash (61)
Flash Media Server (8)
Flex (170)
Flex Trace Panel (6)
FXUG (3)
J2Flex (4)
MAX (31)
Mobile (1)
mxmlc (1)
Other topics (47)
Plugins (9)
Video (7)


Recent Flex Technotes
Recent ColdFusion Technotes
Recent Flash Technotes

http://www.aws-blog.de
http://www.die-flexperten.de
http://www.flexforum.de
http://www.flex.org

Aggregated by fullasagoog.com
Aggregated by MXNA

Short Mode | Full Mode

Herrlich & Ramuschkat