[Looking for Charlie's main web site?]

How to open CFBuilder/FlashBuilder/Eclipse to view a given perspective, from command line

Note: This blog post is from 2010. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Someone on a list asked an interesting question: how do you switch perspectives in CFBuilder (or FlashBuilder or Eclipse) from the command line? For instance, if one has CFB with FB as a plugin, how might one use the command line to create a shortcut so as to launch to the CFB or FB (or another) perspective?

The good news is that there are in fact various command-line switches for launching Eclipse, and these apply just as well to the cfbuilder.exe and FlashBuilder.exe (for instance, some have needed to use the -clean switch to resolve some problems).

In this case of specifying the desired perspective, we want to use the -perspective argument. The trick, though, is knowing the right value to provide. It's *not* the perspective name. Rather, it's the perspectiveid, and that's not so easy to determine. I'll explain below how I found them, but to cut to the chase, here they are.

[....Continue Reading....]

Comments
Thanks for this Charlie

I will add though that the -perspective switch needs to be outside of the quotes when you create the shortcut.

For example my install shortcut is "D:\Adobe\Adobe Flash Builder 4\FlashBuilder.exe" so doing it like "D:\Adobe\Adobe Flash Builder 4\FlashBuilder.exe -perspective com.adobe.ide.coldfusion.perspective.CFML" does not work.

It needs to be "D:\Adobe\Adobe Flash Builder 4\FlashBuilder.exe" -perspective com.adobe.ide.coldfusion.perspective.CFML
# Posted By Steve Onnis | 6/18/10 10:13 PM
Sure, thanks for that clarification. Yes, that's indeed the way command line strings do need to be built, if the path or filename has spaces and would therefore need to be quoted.

To be clear, my example works (as is) if it's executed within the directory where the exe lives. I didn't think to go further and show building it with the complete path (and those quotes if needed) but that complete path would of course be needed to create a real shortcut, so thanks for adding that clarification.

To be honest, my focus was on the more significant challenge of specifying the perspectiveid, and finding those. :-) I'll enjoying hearing if that information was helpful to any readers, now or who may find this in the future.
The next obstacle was starting 2 instances because of the different shortcuts so you need to define separate workspaces for each of the shortcuts so you need to define a separate argument for the workspace using the –data argument

"D:\Adobe\Adobe Flash Builder 4\FlashBuilder.exe" -perspective com.adobe.flexbuilder.standalone.product -data @user.home/Adobe Flash Builder 4
"D:\Adobe\Adobe Flash Builder 4\FlashBuilder.exe" -perspective com.adobe.ide.coldfusion.perspective.CFML -data @user.home/ColdFusion Builder

Just remember the .exe path is for my install so you will need to change "D:\Adobe\Adobe Flash Builder 4" to your own install path
# Posted By Steve Onnis | 6/19/10 12:26 PM
Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting