I'm using IntelliJ IDEA 13.1 Ultimate. For not Maven-managed or Sbt-managed Java/Scala projects, autopop documentation showed up fine. But for Maven/Sbt managed projects, JavaDoc/ScalaDoc does not show up. The dialog box will appear but there's nothing inside.
Make sure you have configured source path for JDK/SDK correctly (Project structure -> SDKs)
and Maven is configured to download sources/docs automatically (Maven -> Importing).
You can also check Settings -> Editor -> Show quick doc on mouse move setting.
Related
I have downloaded a simple project from a Git repository and opened it in Intellij. A couple of the import statements are highlighted in red, stating "Cannot resolve symbol." The packages that cannot be resolved are: zaxxer, springframework.
Normally in Perl or Python I would fire up a dependency manager like CPAN and simply install them, but my understanding is that there isn't really any such thing in Java and that dependencies are resolved sort of on a project-by-project basis.
I have Maven 3 installed, and my project has a pom.xml file, for what it's worth. What should I do now?
If you have opened the project in IntelliJ you can right click the module and choose "Add framework support". Choose Maven there, if it isn't there then it is already enabled.
Then, simply open your pom file. When indexed there should appear an dialog in the lower right corner asking you if you want to auto import changes or just import them manually. Click on one of them and the dependencies will be added.
If you can't see this notification it may have already been shown, then simply press on the "Event log" in the bottom right corner and the notification should be displayed (with eventual other info).
Edit from OP: Solution was: 1) Turn on the view in View > Tool Windows > Maven Projects. There was no Maven project here, so I added it (selected the pom.xml). 2) As described in an answer at Failed to Read Artifact Descriptor: IntelliJ "In Intellij, go to File -> Settings -> Build, Execution, Deployments -> Maven Check the box, ‘Always update snapshots’
It's a little weird that "always update snapshots" isn't turned on by default for IntelliJ, but this got things working.
I'm new to IntelliJ IDEA and I would like to run a simple Maven Quickstart project using it.
I followed all the instructions, the project was sucessfully built. But when I try to compile and run it , the Run button is not activated.
It looks like IntelliJ IDEA couldn't figure out where the main class is.
This is a picture of the project's hierarchy.
What is the problem ? And how can I fix it ?
Thanks !
Refresh the Maven project in the Maven Projects tool window (Reimport All Maven Projects), if it doesn't help, refer to this answer for diagnostics.
The issue is that your source roots were not configured correctly from the Maven model for some reason and the .java file appears in a plain directory instead of the Source root.
You can tell that by the color of the folders and by the icon of the file.
You need to create a Java Project.
File->New->Project->Java->Next->Next->Finish
Then go to the top and do:
Right click parent folder of project->Add Framework Support->Click Maven->Ok
Now Maven should be added to your project and also you should be able to run it
If this doesn't allow you to run the project, click the little drop down box to the left of the grayed out run button and click Edit Configurations.
Then click the + and click Application and set your Main class to the class that has the main method in it, and then it should allow you to run the application.
Hope that helps!
Seems like your java directory is not marked as Source root. Right click on it and click Mark directory as -> Source root
Have you imported the project as a maven projet ?
If yes, click on the body of your fonction and then do CTRL+MAJ+F10 or MAJ+F10
My issue was that I was looking for the equivalent of calling "mvnw" from the console/terminal.
.mnvw (linux) OR mvnw (windows)
I didn't know where this was in IntelliJ. That's how I interpret part of the question that was asked.
The solution wasn't obvious to me so I wanted to share it.
Conceptually, you want to run the default maven configuration (not a specific lifecycle stage). Therefore you need to select the root entry in the Maven panel:
Then you can play the green play button on the panel:
Alternatively, you can right click and run the maven build from the context menu.
If maven not visible top-right side then maven plugins not avaiable in your intellij IDE.
Follow below steps:
click settings icon(top-right side)->select plugin->click on checkbox at maven option->click apply button then ok button.
After few minutes maven able to see in you IDE.
You need to add to project e.g. Jetty or Tomcat (compile to WAR & run Tomcat server with this war).
If you will have Jetty maven plugin you will be able to run app via mvn jetty:run (Add this to Maven run configuration)
I am currently trying to get the git annotations in eclipse mars for a Java file, to see when a line was changed. In Luna, this worked (and still works) with Team -> Show annotations. In Mars, this does not work for me. (Also after reinstall and on a different computer). For other files, for example the pom.xml of the maven project, this works. The project is, besides, this problem, working and compiling fine in eclipse and was created based on the pom.xml in eclipse. Also when the project is created via mvn eclipse:eclipse, show annotations is not working.
I've read the settings with Ignore whitespace changes and Preferences > General > Editors > Text Editors > Annotations > Errors > Show in > Vertical ruler (Show annotations not working), which are correct. Also closing and reopening the Java perspective did not work (https://www.eclipse.org/forums/index.php/t/1011988/). I could not find any other recent threads about this.
Is there some configuration for Java that I am missing, or is this an eclipse bug?
Right click on the file . Team -> "Show Revision Information" - in
Eclipse Neon.
Right click on file -> Team -> Show Annotations. - In previous eclipse versions
I had the same problem. Did you check if your Git repository is imported correctly? For some reason mine wasn't.
Check the Git repositories view (Window > Show view > Other > Git > Git Repositories). If you cannot see the repo there, add it and afterwards you should be able to choose "see annotations" under team.
A little bit old, but maybe to close this question.
You will have to "share" your projects.
Right click the project/projects -> Team -> Share Project.
I did select all relevant projects first and then right-clicked to share the projects. Sometimes this does not work, if a project is in the selection list, that has different porperties.
This will connect your project with your git repo.
Good luck.
I have generated a demo popup menu plugin project automatically by Eclipse. Here is the project structure,
I have set a objectContribution to the point org.eclipse.ui.popupMenus,
When I right click the project and choose Run as -> Eclipse Application, another Eclipse process run and I can see the configured menu works well,
How can I install this plugin for my original Eclipse process?
What I have tried
I did some research and tried to Export -> Deployable plug-ins and fragments, then put it into the %EclipseFolder%/plugins, but it didn't work. I also have tried to Export -> Deployable features and installed it by Help->Install New Software, also failed to see the menu when right click the project.
Will you please help? BTW, I would like to know how to contribute a menu which will display when I right click on a package in a project? Thanks so much.
Use the Deployable plug-ins and fragments wizard and select Intall into Host on the Destination page.
This will create a p2 repository at the denoted location and install the selected plug-ins from there into the host instance, i.e. the Eclipse IDE that you are currently working with. I think a restart may be required.
I am using JDK 1.7 on my eclipse. I am running Maven Build. I have recently tried to debug my application and at first it would take me to a blank page that only gives the option of "edit source look up" after editing the source look up it still does not work. I have also tried cleaning my project( i have done this numerous of times). I have even checked out a new project and redirected my server to the new folder and it still wont let me debug. I Need help as soon as possible
Try Window -> Preferences -> Maven -> Download artifact sources. After that right click on your project: Maven -> Update project -> OK.