Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JSP editor tool tips options
JSP editor tool tips options [message #515636] Fri, 19 February 2010 15:24 Go to next message
Dan is currently offline DanFriend
Messages: 1
Registered: July 2009
Junior Member
I'm contemplating switching to Eclipse after years with IntelliJ

I've installed the latest WTP and Java EE IDE Feature 1.2.1.20090918-0703

I have a MVC app running, I can debug, and almost everything works well, but there are 2 things I seem to be missing from my JSP editor. Code complete is working in JSP, so if I type

System.

I get a list of correct prompts for auto complete. However if I type:

StringTokenizer st=new StringTokenizer();

I get 'StringTokenizer is unresolved' but no prompt to import java,util.StringTokenizer (yes, I know I can do it manually).

Likewise, if I'm typing on a jsp page, and I call a method that does not exist, ie:

foo.getBar();

I get I get no suggestion to "create Method getBar in class Foo" like I would if I were editing actual java.

I tried going Windows -> Preferences -> General -> editors -> File Association and tried changing jsp files to be associated with the java editor, and making the java editor the default, but that did not seem to change anything.

Am I missing something?
Re: JSP editor tool tips options [message #515706 is a reply to message #515636] Fri, 19 February 2010 20:25 Go to previous message
Ian Tewksbury is currently offline Ian TewksburyFriend
Messages: 48
Registered: July 2009
Location: RTP, NC, USA
Member
Quote:
However if I type:

StringTokenizer st=new StringTokenizer();

I get 'StringTokenizer is unresolved' but no prompt to import java,util.StringTokenizer (yes, I know I can do it manually).

One way around this is to invoke content assist anytime while typing "StringTokenizer" (even after finishing typing it with cursor at end after the 'r') and when you select "StringTokeizer" from the list of suggestions it will automatically put in the import for you.

Though it would be nice to have a quick fix action for this as well, which is something you could request by opening an Enhancement Request on Bugzilla.

Quote:
Likewise, if I'm typing on a jsp page, and I call a method that does not exist, ie:

foo.getBar();

I get I get no suggestion to "create Method getBar in class Foo" like I would if I were editing actual java.

Again, this is not something that is currently supported but if you believe it would be a useful feature then you are more then welcome to open an enhancement request, and if you are feeling very ambitious you could even supply a patch yourself.

Quote:
I tried going Windows -> Preferences -> General -> editors -> File Association and tried changing jsp files to be associated with the java editor, and making the java editor the default, but that did not seem to change anything.

Am I missing something?

Creative thinking, but the java editor does not understand how to read a JSP page just like the JSP editor does not now how to read java unless it is in an JSP scriplet or EL statement.

If you have any other further questions or comments please ask away. Also if you do open any enhancement request please post the bug numbers here for documentation purposes.

Blue Skies,

~Ian


Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
Previous Topic:How to enable logging when running Tomcat 5.5 under Eclipse 3.5?
Next Topic:virtual host saved files
Goto Forum:
  


Current Time: Tue Mar 19 06:59:21 GMT 2024

Powered by FUDForum. Page generated in 0.03997 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top