Eclipse managed bean binding on pages - eclipse

Neither Ctrl+click nor Ctrl+space works for beans on pages, i.e. i can't go into bean from page just moving mouse on its name and pressing Ctrl+click, and i don't get content assist when typing some element's value using bean value. All this perfectly works in eclipse 3.5, but not in eclipse 3.7, neither in JSP editor nor in HTML editor. How can i make it work?

You might need a plugin for do so. Take a look at what plugins are you starting in Preferences -> general -> startup and shutdown and compare with 3.5.
If you find that a missing plugin is needed install it. You can do so (depending on the version) by Help -> Eclipse Marketplace.
Your plugins are Help -> Install new software -> in this screen there is a link to "What is already installed"

For me I did the following and it worked:
Right Click on project -> properties
Go to Project Facets
Click on "convert to faceted form"
Check in Java, Dynamic Web Module and Java Server Faces in my case I put it Version 1.8
For Java Server Faces, click on Further Configuration Required -> and choose the proper for your case.
Apply and close.

Related

Spring Tool Suite AutoComplete / Content Assist not working - No proposal kinds present in settings

I'm trying to use Spring Tool Suite 4 with Eclipse Oxygen, but the Auto Complete / Content Assist features specific to Spring Tool Suite do not seem to be present. The normal eclipse content assist appears, but nothing specific to STS will appear.
I followed some of the other helpful posts on StackOverflow, and was pointed to make sure that the Spring proposal kinds in Preferences -> Java -> Editor -> Content Assist -> Advanced are selected. However, upon doing this I discovered that there are no Spring proposal kinds in that section. I am using STS 4, but for some reason the proposal kinds do not appear in that list.
How can I fix this and get content assist / autocomplete to work for Spring Tool Suite 4?
Note: I have tried the solutions for the following StackOverflow articles, but none of them have worked for one reason or another. They all seem to assume that the proposal kinds are present where they should be.
Content autocomplete in spring tool suite 4
Eclipse Spring Tools missing content assist/ autocomplete
Spring tool suite can not automatically show fields variable name suggest?
Here's the list of what appears in for the proposal kinds in my IDE - note that no Spring related options appear.
While upgrading from lower version to sts-4 faced the same issue.
Found this thread and followed the instruction given by vvalencia-cl then the issue got fixed. https://github.com/spring-projects/sts4/issues/82
Solution :
Go to Preferences -> Java -> Editor -> Content Assist -> Advanced, and enabled:
Java Proposals
Java Type Proposals
and then click Apply and close
Go to Window tab at the top -> Preferences -> Java -> Editor -> Content Assist. Now find Auto activation triggers for Java usually at the bottom and now in its textbox paste the following value:
.#(#&$abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
Check this:
for Spring Tool Suite 4
window - preferences - general - key
After press (ctrl+space) for view options
I discovered that this was implemented in Spring Tool Suite 3.9, but is not implemented in Spring Tool Suite 4. That is the cause of this issue.
https://github.com/spring-projects/sts4/issues/107
In Eclipse JSF is supported not via STS, but via the Eclipse WTP JavaServer Faces (JSF) Tools.
For STS 4 install the Eclipse Java EE Developer Tools through Eclipse Marketplace.
While installing select check boxes (I guess 3 check boxes) related to JSF Tools.
The problem might be that your MavenProject doesn't contain Spring-Context jar...
downlode the jar from here
1) https://mvnrepository.com/artifact/org.springframework/spring-context
or simply copy this in POM.xml file-
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.18.RELEASE</version>
note- make sure you are choosing dependency (SPRING-CORE) and (SPRING-CONTEXT) of same version.
Just add Thymeleaf Processor Proposal to default content assist list.
Go to Preference -> Web -> Editor -> Content Assist.
Add Thymeleaf processor proposal from bottom box to default box just above it with help of 'up' button.
Make sure your xml namespace doesn't contain http secure protocol. (it should be http://www.thymeleaf.org)
Example here:
This worked for me. Hope it helps! Happy Coding 😊
Go to Window -> Preferences -> Java -> Editor -> Content Assist Now find Auto something like activation triggers for Java (at the bottom) and set the value as:
.#(#&$abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
Also, make sure in the content assist there is one advance tab in which Java Type proposals and Java proposals should be checked.
Please proceed with the below steps :
1 ) Window tab
2 ) Preferences - > Java -> Editor-> Content Assist
3 ) Make the following changes as shown in the below screens

Eclipse jsp automatic validation

In my old Eclipse (version 3.4.2) if I wrote an error in a java fragment inside a .jsp page (example a variable that doesn't exist) I automatically and immediately saw the problem (red line under
the word).
In Eclipse neon I have to manually validate the page (right click, validate) to obtain the same result.
Is it possible to configure the new version with the old feature?
You can try to go to Window > Preferences > Java > Compiler > Errors/Warnings
and set up your things here.
This feature is also included in Eclipse Neon, don't worry ;) but if you really struggle hard, I suggest an uninstall/reinstall

Mark occurrences for JSP and Scriptlets is not working in Eclipse

I am not able to highlight the matching variables in JSP and scriptlets. I have already tried
Window -> Preferences -> Java -> Editor -> Mark Occurrences
and
Preferences > General > Editors > Text Editors > Annotations.
These are not working.
Is there any way I can highlight the matching variables in JSP and scriplets?
I am using Eclipse Java EE IDE for Web Developers.
Version: Luna Release (4.4.0)
Thanks a lot in advance.
Thanks & Regards,
Archana
It appears that JSP files are opened in Eclipse using their own 'editor' distinct from the Java editor. Its settings are located under Window -> Preferences -> Web -> JSP Files -> Editor, but unfortunately it appears to lack the 'mark occurrences' feature found in the editors for Java and some other languages.
There's an answer to another question on here with information on how to implement 'mark occurrences' in an editor (pointing to Source viewers and annotations in the Eclipse developers guide), but I couldn't even find a bug in the Eclipse JSP 'product' requesting the feature. It's open-source, though, so of course anyone is welcome to contribute that functionality!
It doesn't accomplish quite the same thing (lacking the intelligence to restrict scope), but you can get a rough approximation of this functionality by selecting your variable/method/text and using the generic Source -> Occurrences in File feature.

Attribute completion richfaces on eclipse

I have a problem with my web app on eclipse (helios). I use jsf with richfaces and I haven't the attributes completion for richfaces tag.
All work fine for jsf. I have the richfaces tags (rich:column for example) but when I do ctrl + space to see attribute on the tag, nothing appears.
Someone can help me ?
Thanks.
Add this to your available update sites:
JBoss Tools
Then install Jboss Tools Richfaces.
Once it's installed and you're restarted eclipse you'll need to right click on your project and choose "Configure" -> "Add JSF Capabilities".
Hi Kiva,
A few questions. Are you using JSPs or XHTML/Facelets? First I would check that the RichFaces namespace has been properly registered, no misspellings or typos, etc. Then I would guess is if you're using XHTML to make sure that you're using the JBoss XHTML editor. You can right-click the file in the package explorer and choose "Open with" to make sure that you're using the appropriate editor.
Right click on the project -> Preferences -> Project Facets -> Click on "JavaServer Faces".
If you are still not able to see "OK" Button, please click on "Further Configuration Required" . Here you can add the JSF Implementation jar.
Now refresh your project.

Eclipse PDT, PHPUnit autocomplete

Is there a way to get PHPUnit auto-completion to work in Eclipse PDT without including the libraries in your project?
Have you tried putting the PHPUnit code on your project's include path?
How do you add a PHP framework to code completion/assist in Eclipse PDT and can the framework be added as default for all projects?
Generally speaking in Eclipse, you can add a library or framework to code assist/completion by:
Going into Project > Properties
Under PHP Include Path, pick the "Libaries" tab.
Add an "external folder" with the path to where your framework is
located.
You need to enable it.
Go to menu: Window -> Preferences. Then under PHP -> Editor -> Code Assist. From under auto activation check the enable auto activation check box (note: 200 ms default is a bit slow). You can adjust the timing.