Eclipse pom.xml content assistant - eclipse

I'm new to Eclipse. I'm using Eclipse Kepler to create Maven project, everything works fine except when i'm working with pom.xml the content assistant doesn't give me auto complete just like Netbeans does. Below is the screenshot from Netbeans
My question is can Eclipse be like that in term of gives me auto complete on pom.xml?
Do i need plugin for it?
thank you

There are basically 2 ways for doing that:
Refer to the XML's DTD/XSD in its header, so the simple Eclipse XML editor can help you in a minimal way (e.g., check well-formedness, offers Ctrl+Space assist, etc.).
A better option is to install m2e which is the official Eclipse Maven integration plug-in. It should be available through the Install new software... menu item by default, just search for it. It has quite a heavy support for Maven projects (specific editors, repo browsers, it does update the project configuration automatically, helps you select the dependencies, hanldes multi-module projects, makes easier to import Maven-based projects, etc.)

How to Setup Maven AutoComplete:
1) Download and install the maven plugin into Eclipse. I think the link is this http://www.eclipse.org/m2e/
2) In Eclipse, go to Windows tab -> Preferences
3) Got Maven folder from the left-hand menu. Make sure the three boxes I circled are checked. Click Ok
One of the boxes lets you do AutoComplete. I forget which one.
4) Right-click on your project and go to Maven -> Update Project.
5) You're now done! You should be able to do autocomplete by pressing Control+Spacebar:

Related

Unable to add a Junit file in eclispe

I have an eclipse java project (screen shots attached). I added Junit libraries to my project and when I say New file, I don't see Junit option.
Once Junit libraries are added, eclipse should be able to show the Junit files. Not sure why it wouldn't
You can install it by the following:
Help -> Install New Software
within Eclipse. In the Work with: field, your Eclipse version should have a Site entry in the dropdown, such as:
http://download.eclipse.org/releases/luna/201406250900
Once you choose this, you can then navigate to:
Programming Languages -> Eclipse Java Development Tools
It should then appear afterwards

Eclipse- Maven -Spring

I installed eclipse Luna.At that time Maven option was displayed in window-- preferences.Later i install spring ide.After installation maven got disappeared.pls help me to come out of this
Eclipse is well known for working oddly despite the correct settings and configuration. (As most of free IDEs').
Try to click to your project, then Configure and select Convert to Maven project.
Also clicking to your project and selecting the Clean may help since it removes all the files that are generated automatically.

How do I mavenize a JSF 2.0 project in eclipse?

I have a JSF 2.0 project on my eclipse. I would like to mavenize the same preferably from Eclipse itself. I tried doing it from outside the eclipse manually. There are quite a few steps and I don't like the manual nature of that approach. Could someone help?
Make sure that you have the standard folder structure as recommended by Maven for web projects. Follow this link.
Now, install maven plugin in eclipse (am not sure if it is available by default or we have to download it manually). Simply right click on the project, select Configure and Convert to Maven Project. This should automatically do all that steps to takes to mavenize your current project. This will create a pom.xml file and you can modify it going forward as per your requirements. By the way, I use Eclipse Juno.

Plug-in for Eclipse

I am developing a plug-in for eclipse for JSHOP2 language. For that i made a plug-in project with 'editor'. I have written the code for the neceessary syntax highlighting for JSHOP2 but I don't know how to integrate this types of plug-in with eclipse and then how to take use of it, so that while i write the JSHOP2 code the necessary syntax gets highlighted. Please help me with this.
So you have an editor that works correctly?
Then you need to make sure the files with your extension are opened with your editor. That is described in the Eclipse wiki.
To make sure your plugin is integrated to your version of Eclipse, either create an update site and import the plugin as you would do with any other plugin. Or export the plugin to a jar and copy the jar to the dropins catalog.
Since you are using eclipse to write java code (plug-in project). Create a new eclipse launch configuration. Menu Run -> Run Configuration. Location eclipse application. Right click -> Create new & Run. Hope this helps.

Using both netbeans and eclipse to edit a netbeans project

Hi Netbeans is the default IDE at my workplace. I want to use Eclipse to edit the Netbeans projects. How easy or difficult is it to do this. Can someone outline the steps involved for this.
You should be able to import an existing project into Eclipse by:
File -> Import -> Choose General -> Existing Projects into Workspace
It won't pick up your Netbeans settings however. You may need to set your project up manually in terms of a libraries, source location etc..
Alternatively, if you're using Maven and Eclipse m2eclipse you should be able to import a Maven project and have it pick up most of the settings.
Importing an eclipse project should be easy (for Netbeans 6.7): File->Import Project->Eclipse Project
Or create a 'project with existing sources' which is available for Java, ruby, ...