apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.67k stars 855 forks source link

Filename in tab stripped when filename has space and parent foldername is shown #4359

Open Chris2011 opened 2 years ago

Chris2011 commented 2 years ago

Apache NetBeans version

Apache NetBeans 14

What happened

When I open a file with a filename includes spaces e.g. "For home.txt" and set the option to show the parent folder name in tab, the filename is stripped after the space which looks weird and not correct. I expect to see the full name, because afaik NetBeans has no max-width for tabs shown which is good, due to seen the full filename.

image

It seems that this sometimes happens for files with lower case name included.

Also it is not happen when the parent folder name has also spaces "Test Test\test test.txt" - not stripped

How to reproduce

Did this work correctly in an earlier version?

No

Operating System

Windows 11

JDK

OpenJDK 14

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

Until 12.6 I can reproduce, before I don't have an instance anymore to check it. I thought that this was working long time ago but I can't really remember. Also it has nothing todo with FlatLaF. I changed to Windows LaF and it still happens.

I always test bugs with a fresh clean user dir.

Are you willing to submit a pull request?

No

Code of Conduct

Yes

mbien commented 2 years ago

sounds like a good first issue. Main challenge will be to find the right module to start the investigation, so if anyone knows post it here.

zephyrgr commented 2 years ago

I tried to reproduce this issue but was unable.

If anyone want's to try the code that sets the tab name is here: netbeans/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/FolderNameTabDecorator#getText

Johnny11502 commented 2 years ago

Hello @mbien @Chris2011 , I am a student learning the ins and outs of GitHub and currently have an assignment that requires us to have an issue that we feel confident in solving assigned to us. I would appreciate it if you could assign this issue to me so I can give it a try. Thanks in advance!

mbien commented 2 years ago

@Johnny11502 done. Good luck :)

Johnny11502 commented 2 years ago

@mbien Sorry for the lack of updates but I did end up completing a different issue for my assignment. This was one of the three I chose in case I had issues getting the first one assigned to me. I appreciate you allowing me to keep it for so long, Thank you for understanding.