Spring Tool Suite strange behaviour for content assist - spring-tool-suite

I have a demo spring batch project in STS.
It has strange behaviour about content assist in xml file configurations.
It is working in one of following file job.xml and not working im context.xml.
What may be the problem?
job.xml - Content Assist working
context.xml - Content Assist NOT working

it looks like the jobs.xml file is opened and edited with the Spring Config Editor whereas the content.xml is edited with a standard XML editor. Try Open With... on the context.xml file and choose the Spring Config Editor.

Related

Eclipse+STS or STS all function invalid

I follow some guide, In the video, Their IDE have all those functions (by default! no config needed):
No auto compile in any type
No Spring entry in "NEW" or "XML Configure File" in XML or anything handy
No Spring XML editor in "OpenWith"
etc....
Almost everything is missing
I try both way: Download STS4 or install STS in Eclipse
None of them working
So: How to get those lost function ?
The tutorial you are following is probably using STS3, which contains all the features for Spring XML config files that you mentioned. However, the tooling that you have installed is Spring Tools 4 for Eclipse, which comes with a different set of features. It supports Spring XML config files, too, but in a different way. It is much more focused on implementing apps on top of Spring Boot. You can find more details in the Spring Tools 4 wiki: https://github.com/spring-projects/sts4/wiki

How to get eclipse content assist working in XML files

I have started creating the Spring web application where I need to mention the spring classes in the XML configuration files, for ex, the deployment descriptor (web.xml) where I need to mention the DispatcherServlet class of Spring.
What I am looking for is, I want eclipse to show me the list of packages/classes when I type org.springframework..., like we do in the Java editor. I have googled to find out, but no luck. I am sure there would be plugins available. Can any of you please share me on how to fix this?
Since you are working on a spring project, I'd recommend installing the SpringToolSuite (STS). The info page is here: http://spring.io/tools
Since you already have an Eclipse instance that you are working with, you should go with the update sites: http://dist.springsource.com/release/TOOLS/update/e4.4/
(Make sure to use the correct update site for the Eclipse version you are using.)
Not only does STS include all tools for XML editing, but it also includes special tools for editing your Spring application files.

patch.diff file not working with CSS file

I am using eclipse svn to maintain version for developing java web application with spring and hibernate.
Now i am creating patch now try to applying that patch. My patch is working well with .java and .jsp files but it is not working with .css file.
I have seen that patch successfully created file for .css but it is not applying.
Please help me to solve this issue?

Custom tag file code assist not working in Eclipse but working in IntelliJIDEA

I am new to JavaEE but struggling hard to learn it.
I noticed one thing which is not working that is Code Assist in Custom Tag files in Eclipse. Same working in IntelliJIDEA current version. Both screen shots below.
Someone help me to enable Code Assist in Eclipse Indigo Service Release 2.
Edited
NetBeans & Esclipse don't show code assist for custom classes when I type ${user.} which is EL. Only IntelliJIDEA supports that.
Eclipse
IntelliJIDEA
JAR files
1) Try Window / Preferences / Web / JSP Files / Editor / Content Assist.
Make sure the HTML and XML Tag Proposals checkboxes are checked.
2) Can you specify it as a taglib instead of a tag import?
<%# tablib prefix="user" uri="/WEB-INF/tags/User.tld" %>
3) Do you have the right libraries in the classpath?
Enabling content assist for JSP files
Having the proper files defined in the Java™ build class path is essential for content assist to work properly in JSP files. It is also essential for the links builder to be able to correctly resolve links to servlets or Java beans in JSP and HTML files.
To enable content assist for JSP files:
To determine whether the build path is correct, select Properties from the
project's pop-up menu. Select Java Build Path, and then the Libraries page. You should see the following files:
j2ee.jar
rt.jar
servlet.jar
webcontainer.jar
If they are not present, add them as External JAR files. You may have your own versions of these files, depending on the level of JDK or Servlet API for which you are developing. If your Web applications reference other JARs, you can place them in the build path as follows:
Use the Add JARs button on the Library page.
You must ensure that the JAR file is available to the server by properly
configuring the server.
Add the JARs to the WEB-INF/lib directory.
They will be automatically added to the build path and deployed to the
server in as part of the project WAR.

Spring Explorer not showing beans from bean definition file

I just downloaded the Springsource Tool Suite, and I created a simple bean configuration file called myDefinition.xml and placed it in the root directory of the Spring Project. However, the Spring Explorer is not showing any data. I'm using eclipse 3.5 and the latest SpringSource all-in-one installation.
Also, if I specify invalid property names in the configuration file, I get no error. Autocomplete, however, is working.
Thoughts?
In the Spring Explorer tab in Eclipse, right click on your project > properties. Then go to Spring > Beans Support and select the Config Files tab. You can then select files or scan a directory and that should add them. I haven't found a way to autoscan a directory so I don't have to do this whenever I add a new spring bean file. The beans that appear in that list are stored in the .springbeans file.
Just want to add that if you want to generate a diagram of a webflow of an existing project, you have to right-click said project in Eclipses Project Explorer and "Add Spring Project Nature" by using the Spring Tools entry of the context menu.
There currently (as of 2012-04-10) seem to be problems with the Spring Explorer view when using a purely annotation driven bean definition (i.e. using Java annotations to wire everything up instead of using XML files).
There is a workaround though, by providing a minimum XML file that declares scanning for components.
http://forum.springsource.org/showthread.php?118928-Spring-Explorer-with-Java-based-Web-Container-configuration
Unfortunately, this procedure is still flawed, missing some components.
Just to add Claudio030
Make sure you have JEE perspective selected for your project, otherwise it won't show in Java perspective.