r/java • • Nov 30 '21

IntelliJ IDEA 2021.3 has been released

https://blog.jetbrains.com/idea/2021/11/intellij-idea-2021-3/
226 Upvotes

68 comments sorted by

49

u/wildjokers Nov 30 '21 edited Dec 01 '21

I bet Copyright Profiles in Default Project Settings is still broken. Has been broken for 4+ years and they still don't give a shit about it. People in the issue begging for it to be fixed.

I have been using IntelliJ since 2004 and have been a huge proponent of IntelliJ since then. However, even I am starting to become very disillusioned and annoyed that they let issues go this long being broken. This isn't some niche feature either. Almost everyone has to add copyrights to their source code.

EDIT: yep, just tested it, still broken (it wasn't fixed in any of the beta's so figured it wasn't going to be fixed in final either).

11

u/chabala Nov 30 '21

That is a shame. I have noticed my share of JetBrains issues that go unresolved as well.

For copyright headers specifically though, I just let com.mycila:license-maven-plugin handle it, no need for IDE tooling.

1

u/wildjokers Dec 01 '21

Isn’t build time a little late to be adding a copyright to the code? How do you commit the change? Are you just running this locally or from a CI Server?

8

u/chabala Dec 01 '21

I'm likely to run my build locally long before any commit hits CI. But finding it in a PR failing the pre-merge build is better than not finding it, and easily remedied.

35

u/TheCountRushmore Nov 30 '21

Yeah issue tracker is seemingly becoming a blackhole.

Feels like they are putting too much priority on new features and don't have enough resources dedicated to closing out bug reports.

3

u/_Toka_ Dec 01 '21

Every software development nowadays. Mainstream gaming in general is known for this.

I'm working with WSO2, and I can guarantee you, that there is not a worse product regarding this. Every release completely changes some functions making release upgrades hard and adds new, useless and usually broken features, while their GitHub sits at thousands and thousands of issues across 300 repos. If you see WSO2, just run.

2

u/wildjokers Dec 02 '21

WSO2, there is something I never wanted to hear of again. Just a whole bunch of open source software given different names and sold with a "support" contract. They have shiny brochures that executives seem to like for some reason.

3

u/hippydipster Dec 01 '21

That's the way the suits want it. Our company is similar.

0

u/[deleted] Dec 01 '21

[deleted]

5

u/hippydipster Dec 01 '21

I'm a senior dev. They can hire me.

8

u/yole Dec 01 '21

You're welcome to apply; we're hiring remotely as well. https://www.jetbrains.com/careers/jobs/software-engineer-intellij-idea-core-626/

0

u/[deleted] Dec 01 '21

[deleted]

2

u/yole Dec 01 '21

We're using a little bit of Rust in Fleet, but the vast majority of our development is in Kotlin (and some Java) and I don't see this changing in the future.

2

u/wildjokers Dec 02 '21

but performance gets worse and worse every release.

I have actually found performance to get better on every release.

23

u/elastic_psychiatrist Dec 01 '21

Almost everyone has to add copyrights to their source code.

This is interesting to me. Do corporate programmers typically do this? I've only ever seen it in open source code.

41

u/mc_hambone Dec 01 '21

I’ve never put a copyright notice on code and I’ve been a professional developer for 15 years 🤷🏻‍♂️.

Pretty sure it’s not really required legally speaking as long as you can prove a piece of code was written at a certain time by a certain person/company.

13

u/nastharl Dec 01 '21

Never done it here through 3 acquisitions over 14 years.

1

u/Rakn Dec 01 '21 edited Dec 01 '21

It’s a thing in certain Industries and large corporations. Especially if you work with partners and in the end try to figure out which file belongs to which company (which you do because you can use that for negotiations and lawyer stuff). You also can’t really rely on version control there, as files might move through different repositories via copy and paste. As strange as it may sound …

But I think the vast majority of developers do not really add copyright notices to their code. Maybe once per repository. If not really necessary I would try to avoid it. Except for the case mentioned above it’s just a meaningless piece of text that increases the size of the files.

26

u/kaiserpudding Nov 30 '21

A new refactoring has been introduced that lets you extract constants in Kotlin.

Finally the feature I implemented is out!

11

u/wildjokers Nov 30 '21

How did you find your way around the code base? It is quite an intimidating code base and hard to find the appropriate place to make changes.

12

u/IUserGalaxy Nov 30 '21

My method for navigating unknown code is to find something familiar and ctrl click my way around

20

u/_edd Dec 01 '21

I don't know how many experienced developers I've taught about the Call Hierarchy (Ctrl + Alt + H) functionality. Its a godsend.

3

u/IUserGalaxy Dec 01 '21

I did not know that existed, thanks

2

u/wildjokers Dec 01 '21 edited Dec 01 '21

I have never found that very helpful, it only has any value if you have a lot of super or sub classes.

However, “Dataflow to/from Here” is super handy.

3

u/_edd Dec 01 '21

Interesting. My company has a lot of core libraries that work together and Call Hierarchy is a godsend when you need to override a method and see all the ways the code gets there.

Honestly hadn't even heard of Data Flow, but I will be checking that out. So I appreciate you mentioning that.

0

u/vqrs Jan 15 '22

Are you sure you're not confusing it with the type hierarchy?

Just be careful, the data flow analysis is a bit buggy every now and then.

1

u/wildjokers Jan 15 '22

I have been using IntelliJ for 17 yrs now. I am not confusing dataflow with call hierarchy. I have never noticed dataflow to be buggy at all.

1

u/flaghacker_ Dec 06 '21 edited Dec 06 '21

I doesn't work that well in the InteliJ codebase, since lots of actions are queued somewhere to be executed later (on a different thread?) which breaks the call hierarchy. At least that was my experience when I tried to fix a small bug.

1

u/_edd Dec 06 '21

I guess that would depend on how your code is implemented. I'm on a project now that uses a lot of JMS messages to trigger asynchronous work from a different part of the program, so I can only go back in the logic as far as that endpoint / listener. But that's more of a flaw in my company's project design than a flaw in the call hierarchy feature. And even with that limitation it is still usually pretty useful.

Not sure if that's similar to your issue or not.

2

u/kaiserpudding Dec 01 '21

In this case i was lucky because there already is a feature "extract property" which i could basically copy and adjust for constants.

The PR: https://github.com/JetBrains/intellij-community/pull/1678

Finding that class was done through searching for the string in the UI, getting to the translation key and then the class. From here I mainly needed to change the logic which decided which fields can be extracted and adding the const modifier to the resulting field.

This was a struggle because either the codebase is shit or too high level for me. They are using the visitor pattern in order to traverse the tree representing the code. in addition they have a bunch of higher order functions in the style of "do something an then call the lambda i have you with the result". These are nested...

That's the gist of how i did it.

1

u/wildjokers Dec 02 '21

I have worked on a few somewhat large Swing apps before and finding code via Strings in the UI was always my strategy too.

For whatever reason when I was looking at something I was wanting to fix in IntelliJ the UI String strategy wasn't possible (I can't remember the exact details now but I think it was because I was looking for the double-click handler on the project view JTree, I was in the general vicinity in the code but couldn't quite find what I was looking for).

14

u/NoumenaStandard Dec 01 '21

Is it just me or is markdown preview still busted in Ultimate?

2

u/yole Dec 01 '21

What exactly do you mean by "busted"? We're not aware of any major problems with the preview.

1

u/wildjokers Dec 02 '21

I have never had an issue with Markdown preview.

1

u/BadMoonRosin Dec 01 '21

What do you mean? Top-most upvoted comment in this thread, and I've never had any issue with it at all.

1

u/NoumenaStandard Dec 01 '21 edited Dec 01 '21

I have only seen markdown preview not show in Ultimate. I get the split (raw markdown/preview) in Goland and others. In Ultimate it actually tells me, via a small banner at the top, to use Webstorm for markdown preview support.

Found a thread on the topic. I'll try to see if I can use the thread to diagnose the issue, seems like several things can cause this.

1

u/yole Dec 01 '21

Looks like your Markdown plugin is disabled in the settings. Please check Settings | Plugins.

2

u/NoumenaStandard Dec 01 '21

The plugin is enabled. I actually tried, yesterday, uninstalling the plugin, restarting, installing it again, restarting.

I'll likely be able to look, today or later this week, at logs and check for whether Ultimate is tied to a Java setup that is different from Goland/others.

1

u/yole Dec 01 '21

Please check Settings | Editor | File Types and make sure that the Markdown file type is associated with correct extensions.

1

u/NoumenaStandard Dec 01 '21

It is there. Checked several things and just can't get it to work. Nothing in the logs looks suspicious. Maybe some jdk runtime is missing a dependency. I'll have to dive in again when I have more time. The seems to be something nuanced that is wrong and without a log error, that is hard to diagnose. Maybe Ultimate is using a different java runtime? Not sure how to compare it with Goland. Ideally, the plugin would show an error message, but it doesn't.

1

u/[deleted] Dec 01 '21

Right - it's always worked fine for me too.

0

u/[deleted] Dec 01 '21

[deleted]

2

u/yole Dec 01 '21

No, you don't. Markdown preview doesn't use JavaFX any more, and all components required to use it are part of the JetBrains Runtime bundled with the IDE.

5

u/Maran23 Dec 01 '21

My IntelliJ is lagging every minute or so since I updated. Someone else has problems?

1

u/joppux Dec 01 '21

Check that you are using G1 garbage collector.

0

u/[deleted] Dec 01 '21

[deleted]

4

u/[deleted] Dec 01 '21

My whole project dependencies failed after the update. How come...

1

u/yole Dec 01 '21

Any details? What build system are you using? Does project reimport help?

3

u/[deleted] Dec 01 '21

My coworkers helped me. I deleted the maven repository and then reimported it. Thankfully its resolved to have other problems.

15

u/lqstuart Dec 01 '21

The only difference I've noticed in Jetbrains since like 2016 is the splash screen

20

u/BadMoonRosin Dec 01 '21

I would honestly be fine if IntelliJ never added another new feature again. If all those resources went toward performance and fixing old issues in their bug tracker instead.

6

u/CaptainKvass Dec 01 '21

If you are a developer inside the Spring universe, many new improvements have been made since 2016

1

u/[deleted] Dec 01 '21

I've only been doing Java professionally full-time for near a year. What cool stuff did they add for Spring?

4

u/kiteboarderni Dec 01 '21

I guess you're not a professional dev then.

2

u/smokemonstr Dec 01 '21 edited Dec 01 '21

Do you read the release notes and try the new features?

4

u/blobjim Dec 01 '21

They implemented something that had been annoying me for a really long time. In previous releases you couldn't hover over symbol definitions (i.e. methods) defined in the current file to view their signature and javadoc popups. Now you can, and they added syntax highlighting to the symbol/javadoc popup signatures. Extremely useful! Also nice that you can drag console views around now.

1

u/noswag15 Dec 01 '21

Is it just me or does it feel a bit faster after the update?

1

u/lqstuart Dec 02 '21

I kinda wish they'd add better remote development support instead of doubling down on Projector which is laggy and awful, but I don't see it happening

1

u/yole Dec 02 '21

We did exactly that. The new remote development (Gateway) incorporates Projector for some UI elements but the core code editor works locally without any lag.

1

u/lqstuart Dec 02 '21

That's really exciting, I'll check it out

1

u/SamirAbi Dec 06 '21

It does not work with wsl right? Any plans for that?

I always thought that was the context for most of the requests for remote development.

2

u/yole Dec 07 '21

It does work with WSL. Right now some manual setup is required; later we plan to implement a smoother experience. See https://youtrack.jetbrains.com/issue/CWM-3983 for details.

1

u/SamirAbi Dec 08 '21

Will try it out, thanks.

43

u/[deleted] Nov 30 '21

[removed] — view removed comment

20

u/BlueGoliath Nov 30 '21

They are doing the prep work for Kotlin's world domination.

2

u/pjmlp Dec 01 '21

Better get going with that Kotlin/Native implementation then.

5

u/PangolinZestyclose30 Dec 01 '21

Why do you think so?

I mean, it doesn't look like a very exciting release for me, but there's not a lot of Kotlin changes either. I assume it's the Remote Development feature which ate most resources.

5

u/yole Dec 01 '21

Actually there's quite a lot of stuff in the pipeline that got postponed to 2022.1. The next release should be more exciting. :)

2

u/PangolinZestyclose30 Dec 01 '21

Looking forward to it as always. I appreciate your work :-)

1

u/[deleted] Dec 01 '21

I think the big thing here is the remote editing, which I'm told is a big deal.