I've recently moved to CFE from Dreamweaver. I used to be able to double-click a .cfm/.cfc file and have Dreamweaver start up and be editing that file. However, if I change the default app for these files to eclipse, when I double click a new instance of Eclipse starts up and I get an error about my workspace being locked if Eclipse is already open. Is there anything I can do to default opening new files with Eclipse to the current instance?Basically Eclipse doesn't work in this way ("WHAT?!!" you might say). It has the idea of Projects which you map to a web folder, so you would (for example) create a CFML Project, give it a name (hmmm... mySite seems to do nicely) and then, instead of using the "Default Location", point it to your site. You can then edit stuff directly. "Of course..." you might say, "...but what if I want to edit the custom tags under Coldfusion, they aren't in my web directory!", in this situation, I find that linked folders work a treat, and also means I don't have to alt+Tab back to Windows Explorer/OS X Finder. If you want to see how to implement them, watch this little video I made a while back. (basically create a new folder in your project in eclipse, give it a name, click advanced, and select the folder it actually points to outside your project). I find that it takes some getting used to, but after a while, I don't really run around using the Windows Explorer/OS X Finder anymore looking for things. If you also go to Windows -> Preferences -> General -> Keys and find the cfscript keybinding (Ctrl + Shift + R) and remove it, you can now, from anywhere in the IDE hit those keys, enter the file name you get a dialog that you can enter a file name (and even use wildcards such as * and ?) and it will search through ALL your projects and find the file you are looking for. Much easier that silly explorer eh? I hope that helps, even though it doesn't directly answer your question. On a related note, we have also provided the File Explorer view, (Window -> Show View -> Other... ->CFML -> File Explorer) which allows you to browse your filesystem like the "good" old days with Homesite. You can even add FTP servers! Edit: Just so you know, this is an oft requested feature of Eclipse anyway check out this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=4922
Ask Mark: Why you can't edit files in CFEclipse straight from Windows Explorer
January 26, 2007 · 7 Comments
I just got a question sent to me and its something I would like to clear up (and show where the responsibilities lie really). The question is:
7 responses so far ↓
1 Teddy R Payne // Sep 22, 2008 at 4:11 PM
I basically told them that when you want edit one file then I can see your point. When you want to edit a file that has dependencies? You are introducing yourself to problems that you may not immediately see.
I was balked at with this comment as they "know" what their code does. The simpel truth is that do you think of your application as an single entity or just a strung out code hash?
This tends to get their attention when considering if their application is spaghetti or not.
So, I follow up with an assugaging point of view that says that when editing a small aprt of an application that you are editing the overall behavior of the application.
The project idea leads them to treat the application as something more than just script.
Most modern OO language has an IDE for code projects. While CF is not pure OO, if you plan and treat your code as such then it just fits that you want to examine your project.
Yes, this can be done in other editors like DW and HS+, but plug-ins for Eclipse truly make it a single point of development that does not need external tools.
Having FTP, XML, CVN, SVN, FusionDebug, CSS, JS, HTML and RDS support into one tool just makes development life more interesting and convienient.
The fact that CFEclipse works with 3.1.2, 3.2.1 and 3.3M4 shows dedication of the CFEclipse Crew to support FlexBuilder and modern adaptions of Eclipse.
Thank you as always,
Teddy
2 Sammy Larbi // Sep 22, 2008 at 4:12 PM
On the other hand, If I've already got my IDE open, what am I doing going through the file system to open a file that I want to open in there?
That's how I work, so this has never bothered me. I guess some people work quite differently, it appears (not that that is unexpected).
3 Christopher D // Sep 22, 2008 at 4:12 PM
4 Mark Drew // Sep 22, 2008 at 4:12 PM
Once you get used to Projects, the way forward is good.
Of course, I know this is important to some developers, so go and vote and comment on this issue on the Eclipse site.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=4922
I am not sure how many times I will have to answer to the little pointy fingers saying "I am not using it unless you develop this for me" but really, projects are a way forward for more reasons that I care to write here.
5 Big Kev // Sep 22, 2008 at 4:12 PM
6 EECOLOR // Sep 22, 2008 at 4:13 PM
Dragging external files (i.e., from the Windows file explorer) on to the editor area of a workbench window has the same effect as Open File. Also, you can now drag an editor between workbench windows associated with the same workspace.
Maybe that helps?
Greetz EE
7 Hippyjim // Oct 14, 2009 at 2:37 AM
Here's a real situation:
- I have 2 / 3 projects on the go at once, at various stages. I have them all managed in Eclipse - so far so good.
- I then get a call saying "there's such and such wrong, drop everything to fix it" - I know that all it takes is a single edit to a single file on my colleagues application, written using his IDE of choice (not Eclipse).
so...do I go through the pain of attempting to detangle his code in notepad?
Do I import the whole app (that i will probably rarely touch) into eclipse as a project, dumping unwanted project files on his server?
Or do I simply open up the file, change the single line I need (easy to find that in an idea that actually colour codes and lays everything out sensibly etc), and then save, and return to my current project...
Now imagine you're the guy on the phone, waiting for me to fix it - you choose.
p.s. thanks to eecolor for the drag drop tip...saved me a lot of headaches.
Leave a Comment