[Looking for Charlie's main web site?]

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

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.

Some key CFB and FB perspectiveids

  • ColdFusion: com.adobe.ide.coldfusion.perspective.CFML
  • ColdFusion Debugging: com.adobe.ide.coldfusion.ui.debugPerspective
  • Flash: com.adobe.flexbuilder.editors.mxml.ui.perspectives.development
  • Flash Debugging: com.adobe.flexbuilder.debug.ui.perspectives.debug
  • Flash Profiling: com.adobe.flash.profiler.ui.ProfilingPerspective
  • Java: org.eclipse.jdt.ui.JavaPerspective
  • Team Synchronizing: org.eclipse.team.ui.TeamSynchronizingPerspective

Still other perspectiveids

Of course, there are many other perspectives built into Eclipse and added by various tools, and you may want to open one of them (such as those related to SVN, CVS, etc.) Fortunately, at least one person has organized a list of them (though he lists none that are specific to Adobe products). For some of these, you will naturally have to have installed their respective tools/features them for them to open.

Using the Argument

So to wrap things up, the command like to open CFBuilder with the Flash perspective is:

CFBuilder.exe -perspective com.adobe.ide.coldfusion.perspective.CFML

I don't have CFB installed as a plugin on FB, but I do have FB and confirmed that at least the FB values I offered above work for that. I assume the CFB perspectiveids I offered would work in FB as well (again, assuming of course that you have installed CFB as a plug-in to FB.)

How I found the CFB and FB perspectiveids

This was a fun but challenging question. I did quite a bit of searching to find the answer. I followed some leads that were dead-ends (some said they were listed in plugins.xml, but I did not find that to be the case) so I finally just searched the FB and CFB installation directories directly for references to phrase "perpectiveid". In my case, I found them in a few files, but then the only one that had values like those above (I tested org.eclipse.jdt.ui.JavaPerspective, knowing it worked) was here:

C:\Program Files (x86)\Adobe\Adobe ColdFusion Builder\configuration\org.eclipse.core.runtime\

specifically in a file called .mainData.n (where n is a number that will vary per your local configuration). Of course, the path prior to \Adobe may vary on your own system.

In FB, it was in:

C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\configuration\org.eclipse.core.runtime\.mainData.n (again, where n is a number that will vary per your local configuration)

These are both binary files, but opening them I was able to search for perpectiveid and found the various references documented above.

Hope it helps someone. If there are any other facets of this that people should understand, feel free to comment.

Using the Flex Builder CF Wizard when deploying on a remote server

If you try to use the Flex Builder CF Wizard, you may get tripped up by trying to deploy the resulting SWF (with its communication back to the CF Server) on a remote box (where that CF Server would live). It's easy enough to do, but it may fail to work, if you're not careful about how you configure things while running the wizard, to indicate that remote server URL. It was causing quite a bit of consternation for some, and finally Ken Reiss has observed the solution and blogged about it:

http://www.kenreiss.com/blog/index.cfm/2006/8/10/Flex-20-with-CFMX-702--SUCCESS

I just think this is something that others may trip over in the future and not find readily, so I want to point it out to those that I can.

Flex 2 / CF Presentation by Ben Forta, now online

If you're looking for yet another avenue of introduction to Flex and its intergration with CF, particularly a free one-hour Breeze session, check out the recording of BEn's presentation from a couple weeks ago:

http://www.adobe.com/cfusion/event/index.cfm?event=list&type=ondemand_seminar&loc=en_us

On that page, select ColdFusion or Flex from the product list on the right, and on the resulting page, don't be thrown off by the title, "Government: Building Rich Internet Applications". It's of value to all viewers.

As Ben is wont to do, he avoids being powerpoint-centric and jumps right into some generic Flex demos first, and then 20 minutes into it starts to really talk about Flex/CF integration. There's about 5 minutes of discussion after that and then he jumps into code-centric demos, showing the CF-related integration in some flex code and in the Flex Builder, including the wizard. By about 45 minutes he instead starts coding Flex/CF integration manually within the builder, which some may find compelling. There is Q&A throughout (which as always in Breezo's is a bit of a struggle, torn between answering questions and staying on topic) and a lot of Q & A at the end, which many may especially enjoy.

BlogCFC was created by Raymond Camden. This blog is running version 5.005.

Managed Hosting Services provided by
Managed Dedicated Hosting