Здравствуйте, IDEA перестала подчеркивать ошибки красной волнистой линией и показывать сообщения-лампочки. Как вернуть эти свойства?
-
Вопрос задан
-
955 просмотров
Пригласить эксперта
Idea будет вести себя как обычный блокнот пока не поймет, что вы работаете над «проектом».
В File -> Project Structure нужно настроить SDK для проекта и Language Level
Так-же, возможно, потребуется указать папки с исходниками, тестами и ресурсами.
Все это idea умеет делать автоматически импортируя maven или gradle проекты.
-
Показать ещё
Загружается…
21 сент. 2023, в 14:51
30000 руб./за проект
21 сент. 2023, в 14:49
25000 руб./за проект
21 сент. 2023, в 14:33
5000 руб./за проект
Минуточку внимания
Intellij Idea 14.1.2, Gradle 2.3
I have a project with few java subprojects. Gradle builds works as expected but Intellij Idea does not capture the output of it and does not show the Messages Tool Window where you can click on the error and go to the source file.
Steps to reproduce:
- Create new gradle project
- Create new class with one method
- Introduce intentionally one error
- Build using Gradle tool window
Expected result: Message Tool window will show up showing the error.
Actual result: Output is shown in the Run tool window, but the Message window is not shown (it’s menu item is not even active in View -> Tool windows)
I’ve tryed to reimport the project, to create it from scratch, searched Idea’s settings, manipulated manually values in *.iml but with no success and I am running out of ideas.
Any idea where I can find a setting that tells the IDE to direct output to the Messages window?
asked May 4, 2015 at 18:34
OgnyanOgnyan
13.5k5 gold badges64 silver badges82 bronze badges
In Intelij 16.2 I had this problem as well. In the top left corner of the «Run» window there is an odd looking button that when you mouse over is labeled «Toggle tasks executions/text mode.» Click it and it will show you the output from the Gradle build instead of the steps in the task execution.
answered Aug 4, 2016 at 16:24
BrianCBrianC
1,7931 gold badge18 silver badges26 bronze badges
4
I had this problem on IntelliJ 2017.1, as well. The answer posted by BrianC on Aug 4 ’16 helped me—however I found the button on the opposite side—on the left side of the Run window, therefore I am posting an image with the exact button.
When you hover over this button, it says ‘Toggle tasks executions / text mode’. The image shows the button when selected.
answered May 26, 2017 at 22:18
Jordan GeeJordan Gee
3703 silver badges10 bronze badges
Finally found the solution:
For some reason when creating gradle project or module Idea does not add automatically the java-gradle facet.
In order to get the errors in the Message Tool window you will have to add it to your module(s) like this:
File -> Project structure -> Facets
Click on the plus sign, select Java-gradle, select module, OK.
Please note that if you start the build from the Gradle tool window (the right side pane) errors will not be shown in the Message window. You will have to use the «normal» build in the IDE, e.g. Build -> Compile module.
answered May 5, 2015 at 6:36
OgnyanOgnyan
13.5k5 gold badges64 silver badges82 bronze badges
I had a very similar issue in 2019.2.* where if I had previous results in the run tool window and then did a gradle build and had errors, it would switch me to the run tool window instead of the build window. This looks to be fixed in 2019.3.*.
answered Dec 17, 2019 at 19:14
JavaRush — это интерактивный онлайн-курс по изучению Java-программирования c нуля. Он содержит 1200 практических задач с проверкой решения в один клик, необходимый минимум теории по основам Java и мотивирующие фишки, которые помогут пройти курс до конца: игры, опросы, интересные проекты и статьи об эффективном обучении и карьере Java‑девелопера.
Подписывайтесь
Intellij Idea 14.1.2, Gradle 2.3
У меня есть проект с несколькими подпроектами java. Конструкция Gradle работает так, как ожидалось, но Intellij Idea не выводит на экран ее вывод и не показывает окно инструментов сообщений, в котором вы можете щелкнуть по ошибке и перейти к исходному файлу.
Шаги для воспроизведения:
- Создать новый проект Gradle
- Создать новый класс с помощью одного метода
- Внесите преднамеренно одну ошибку
- Построение с помощью окна инструментов Gradle
Ожидаемый результат: появится окно Message Tool, показывающее ошибку.
Фактический результат: вывод отображается в окне «Выполнить», но окно «Сообщение» не отображается (элемент меню даже не активен в «Вид» — «Окна инструментов» )
Я попытался выполнить reimport проект, чтобы создать его с нуля, найти настройки Idea, манипулировать значениями вручную в *.iml, но без успеха, и у меня заканчиваются идеи.
Любая идея, где я могу найти параметр, который указывает IDE на прямой вывод в окно «Сообщения»?
Он показывает ошибки, которые вы ожидаете, если у вас нет файлов JUnit jar в пути к классам.
Я создал тот же файл, что и в моем IntelliJ, и он действительно показывает ошибки:
Что вы могли бы сделать, так это то, что вы, вероятно, случайно добавили банку в путь к классам.
Проверьте External Libraries как вы можете видеть на картинке. Если там нет JUnit, то это действительно отсутствует.
Теперь я легко могу добавить JUnit jar из IntelliJ, и вы заметите разницу во External Libraries:
Здесь он добавлен в » External Libraries и ошибка исчезнет.




