Moving to CFEclipse - teething issues

67 views
Skip to first unread message

Tarnation

unread,
Nov 30, 2011, 9:14:36 AM11/30/11
to CFEclipse Users
Hi folks - I've been contracted to a team who code CF in Dreamweaver
and I'm trying out CFEclipse as a 'proper' IDE to push everyone else
onto. Love it so far, great achievement for open-source dev, but I
have a couple of newbie issues... if anyone can point me in the right
direction that would be awesome:

A) Pasting brackets :: If I copy and paste a section that includes a
bracket, CFE pastes an extra bracket on the end. Search yielded this
post from yesteryear but no fix:

http://groups.google.com/group/cfeclipse-users/browse_thread/thread/bdad22a7d6701989/86630b744730797a?lnk=gst&q=paste#86630b744730797a

Just occurred to me that brackets auto-close, I wonder if I disable
that... not obvious looking @ preferences

B) Italic comments :: My comment blocks are shown in italics which is
quite hard to read, how can I correct? Again, this has been mentioned
but no outcome:

http://groups.google.com/group/cfeclipse-users/browse_thread/thread/f60e4fdf7b4d94dd/202fcb2fe705d830?lnk=gst&q=italic#202fcb2fe705d830

C) Directory file search :: Is there no way to search all files in a
directory? I need to search outside of projects sometimes. Apologies
in advance for newbie / generic Eclipse question but I'm a bit
stumped.

Thanks for reading!

-T-

wakef...@gmail.com

unread,
Nov 30, 2011, 10:24:01 AM11/30/11
to cfeclip...@googlegroups.com
I'm not a CFEclipse pro, but as for item C you can use Eclipse's built in file search. Search -> File, or the flashlight icon in the toolbar -> File Search. For File name patterns I usually put something like "*.cfc, *.cfm, *.css, *.js". For Scope I usually choose Selected resources, which searches whichever folder was highlighted in Project Explorer and subfolders.

Nathan Strutz

unread,
Nov 30, 2011, 1:06:17 PM11/30/11
to cfeclip...@googlegroups.com
So the pasting bracket problem is the same as the auto-close for brackets. If you turn them off, it won't automatically insert them when you type or when you paste in code.

For the italic comments problem, it doesn't happen to me. It can probably be changed in Eclipse > Window menu > Preferences > General > Appearance > Colors and Fonts. If nothing else, you can pick a better font for your editor. I recommend Consolas.

To do a directory search, select the folder in the Navigator view - Eclipse works best when you have all your files set up in individual Projects. Select the folder, and click the search button or hit CTRL+H. In the File Search tab of the search window, type what you're searching for and in the Scope form group, pick "Selected resources."

HTH

nathan strutz
[www.dopefly.com] [hi.im/nathanstrutz] [about.me/nathanstrutz]



-T-

--
For more information on CFEclipse visit: cfeclipse.org
For support, FAQ and tips and tricks visit: trac.cfeclipse.org

You are subscribed to the Google Groups "CFEclipse Users" group.
To post send email to: cfeclip...@googlegroups.com
To unsubscribe send email to: cfeclipse-use...@googlegroups.com
For more options, visit this group online: http://groups.google.com/group/cfeclipse-users?hl=en

Tarnation

unread,
Dec 1, 2011, 4:40:04 AM12/1/11
to CFEclipse Users
Thx for your help guys.

A) @Strutz that is a decent workaround for the pasting bug, sorted.

B) I'd still like control over how comments are presented, even if I
have to get elbow-deep in config files - good call on the font though.
I'm using Google's Droid Sans Mono ATM. Get it here if you're
interested:

http://damieng.com/blog/2007/11/14/droid-font-family-courtesy-of-google-ascender

update: I had an error this morning, trashed my workspace and the
italic comments are gone? I think this one was caused and eventually
solved by my own stupidity...

C) Forgive the stupid question but 'Navigator' is for navigating
Projects right? So long-story-short I can't do a file search without
creating a project for the files in question? The place I'm at
currently have bits of scripts everywhere so creating projects for
everything in order to search isn't really an option.

> >http://groups.google.com/group/cfeclipse-users/browse_thread/thread/b...


>
> > Just occurred to me that brackets auto-close, I wonder if I disable
> > that... not obvious looking @ preferences
>
> > B) Italic comments :: My comment blocks are shown in italics which is
> > quite hard to read, how can I correct? Again, this has been mentioned
> > but no outcome:
>

> >http://groups.google.com/group/cfeclipse-users/browse_thread/thread/f...

Hirons, Budd A

unread,
Dec 1, 2011, 11:00:36 AM12/1/11
to cfeclip...@googlegroups.com
A) I see the same problem when pasting text that ends in a double quote-- cfeclipse inserts a second close quote

C) There is a view in Eclipse called File Explorer that you can use to browse for this. I never use it though because I truly drink the project based kool-aid :P It is true that I have a few folders of scripts that I use for prototyping little things and discovery on the side, and I just keep them in a project named 'scratch' ... worrying about where the files actually live becomes moot if you just rely on the project-in-a-workspace notion for organizing your work within a real IDE (ie not DW).

-----------------------------------
Budd Hirons Jr
Innovative Learning Center - Tulane University
504.314.2533

Nathan Strutz

unread,
Dec 1, 2011, 11:26:12 AM12/1/11
to cfeclip...@googlegroups.com
 On Thu, Dec 1, 2011 at 2:40 AM, Tarnation <xan...@gmail.com> wrote:

C) Forgive the stupid question but 'Navigator' is for navigating
Projects right? So long-story-short I can't do a file search without
creating a project for the files in question? The place I'm at
currently have bits of scripts everywhere so creating projects for
everything in order to search isn't really an option.

 
Yeah, so, this was my biggest mental hurdle I think when first getting into Eclipse (gosh like 7-8 years ago?). My advice is to bite the bullet and set up some projects. Trust me, you will want to. At first it seems impossible and annoying, then pretty quickly you will figure out why this is such a good thing, and you will start to compartmentalize your miscellaneous scripts into individual projects, all in their own box, that will help you think in terms of applications instead of scripts. For me, I think it really turned me into a programmer instead of a script kiddie, an architect instead of a code monkey.

That's kind of a spiritual reason to use projects, but I'm going to make a list here of the physical reasons you want to use projects in Eclipse, just things off the top of my head. 

This is why you need projects instead of just browsing files in Eclipse:

- Version control integration works only with projects - this alone should seal the deal. Use version control!

- File searching works better

- Working Sets - you can specify projects, folders and files that are related to show only those in the navigator and search in only those - truly another killer feature

- Mylyn works only with projects - Mylyn is a task-based context switcher with perfect memory that integrates with bug tracking and source control systems

- You can specify the version of CF server you are using per project and CFEclipse will switch the CFML dictionary, e.g. cfspreadsheet won't be available in a CF8 project, but it will in a CF9 project

- Tasks view works only with projects which indexes all your TODO and FIXME comments

- Bookmarks view and Problems view seem to only work with project files as well

- Navigator view gives you local file history, even without source control

- Open Resource dialog (ctrl+shift+R) works only with files in projects, I was skeptical at first but this has turned out to be a very useful tool

- CFEclipse browser preview for CFML files only works when you wire a project up to a web address

Basically, to summarize all of this, Eclipse only really works when you set up projects. I VERY HIGHLY recommend you organize your scripts into projects, even if it's one project that encompasses all of your scripts. It will be worth it, and it's not as difficult as Dreamweaver and HomeSite always were.


Last thing, a consolation prize, if you install Aptana (either as a plugin into CFEclipse, or as an application then add CFEclipse to it) or Adobe ColdFusion Builder, the Aptana File Search dialog can search a non-project directory. It's in the typical place (CTRL + H, usually in the first tab because it's sorted alphabetically).

wakef...@gmail.com

unread,
Dec 1, 2011, 11:28:03 AM12/1/11
to cfeclip...@googlegroups.com
You can link an external folder in another location and it will show up under your project. This might seem like polluting your project but could work for you to perform searches when necessary. Add a new folder, click Advanced then Link to alternate location. I do this all the time to have projects in folders outside of my Eclipse workspace folder. Just be careful that you don't link a folder then also link it's parent/ancestor as this will severely slow down Eclipse's project scanning (you can work around this by using a Resource Filter on the parent folder). File explorer view is probably a good idea too. Not sure though, I never use it either.

wakef...@gmail.com

unread,
Dec 1, 2011, 11:31:20 AM12/1/11
to cfeclip...@googlegroups.com
p.s. No use Project Explorer instead of Navigator.

Peter Boughton

unread,
Dec 1, 2011, 11:39:33 AM12/1/11
to cfeclip...@googlegroups.com
> C) Forgive the stupid question but 'Navigator' is for navigating
> Projects right? So long-story-short I can't do a file search without
> creating a project for the files in question? The place I'm at
> currently have bits of scripts everywhere so creating projects for
> everything in order to search isn't really an option.

That's exactly why you *should* use projects!

Bits of scripts everywhere is bad, and anything which
accepts/encourages this is also bad.

You can create multiple projects that are related to each other, and
you can use working sets to group them more directly, for searching
and other things.

So, if there are valid reasons why you can't immediately move all the
various parts into a single location, then create multiple projects
and group them into a Working Set and/or use the linked resources
facility.

Nathan Strutz

unread,
Dec 1, 2011, 11:48:05 AM12/1/11
to cfeclip...@googlegroups.com
Actually this is a really good point, but I'm not sure what the exact difference is, and when would I use one over the other? They look pretty much identical to me. What gives?
On Thu, Dec 1, 2011 at 9:31 AM, wakef...@gmail.com <wakef...@gmail.com> wrote:
p.s. No use Project Explorer instead of Navigator.

Peter Boughton

unread,
Dec 1, 2011, 12:02:53 PM12/1/11
to cfeclip...@googlegroups.com
I think it's because CFEclipse doesn't differentiate - but there is a
difference in the way things are presented if you're working on other
projects/plugins, like Java.
(Along the lines of one is more file-focused, whilst the other is more
about how your source is structured.)

When CFEclipse eventually gets smarter parsing, it might make sense to
have an Application-focused view, which (for example) shows mappings
as if they were directories, along with allowing you to expand CFCs to
see a list of function definitions without needing to open the file,
and stuff like that.

Tarnation

unread,
Dec 5, 2011, 4:57:56 AM12/5/11
to CFEclipse Users
@wakeford83 - linking external resources solves my problem, I can add
piecemeal directories and search them in CFE, good shout!

@Boughton - You're preaching to the choir on why we *should* be using
coherent projects my friend, but it's not my operation - if they want
to structure things badly then it's their call. I've only just
introduced the team to Firefox / Firebug for client-side debugging so
one thing at a time!!!

Reply all
Reply to author
Forward
0 new messages