Bug 550385 - Project Explorer should support Navigator View properties
Summary: Project Explorer should support Navigator View properties
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks: 550379
  Show dependency tree
 
Reported: 2019-08-23 09:54 EDT by Manoj N Palat CLA
Modified: 2022-02-17 04:22 EST (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manoj N Palat CLA 2019-08-23 09:54:51 EDT
Ref bug 549953 comment 25 

Since Navigator view is marked for deletion citing Project Explorer as the alternative,  Project Explorer need to support the functionality of Navigator as well.

Specifically, Navigator view supports folder view and shows all the files.
For eg, if there are .class files in src folder of the project, Navigator view shows them and when I click on the class file, Eclipse opens it in the JDT disassembler - Currently project explorer opens the .class files in ./bin but it does not show the .class files in ./src folder.
Comment 1 Dani Megert CLA 2019-08-23 10:15:13 EDT
You can disable 'Java Elements' in the View menu > Filers and Customization... dialog. And this *should* also disable the filters, see bug 245105.
Comment 2 Mattias Bertilsson CLA 2019-10-07 08:53:15 EDT
As stated repeatedly in the original bug 549953, the Navigator view has come to serve an important purpose, in that it shows, as close as possible, the actual project content on disk. The Project Explorer has a multitude of filters and virtual content, enabled by default. Most of the time, this is excellent. I use them all the time and I have written additional ones for different Eclipse based products over the years. Sometimes though, such as when reviewing something before committing it to version control, etc, you really want to see the actual files and folders, nothing added, nothing hidden.

As also stated repeatedly in the answers to those comments in bug 549953, each individual filter or virtual content category can be enabled / disabled in the Filters and Customization dialog of the Project Explorer, but you do not want to click through some 40 filters and some 10 content categories, or more, each time you switch between the "normal" use cases and the ones that require you to see the actual project content.

I guess you could implement a single button / view menu entry in the Project Explorer that disabled all filters and all content contributions, except plain resources, but supporting that use case with a separate re-implemented Navigator view might be preferable. I think that was what stated when the code and API backing the old Navigator view was deprecated years ago.
Comment 3 Nathan Niesen CLA 2019-10-30 14:27:44 EDT
An unadulterated view of the file system is a must have. Nothing reorganized, nothing hidden, nothing added (e.g., JRE, Referenced libs, External Deps).

Out of the box, the Project Explorer configuration essentially mimics the Package Explorer.

It looks like I can configure Project Explorer to mimic Navigator with these settings:
 * Filters and Customization > Content > Java Elements > unchecked
 * Filters and Customization > Pre-set filters > deselect all
 * Project Presentation > Hierarchical

It seems the key is really the "Java Elements" which reorganizes/duplicates the files, makes the "Flat" presentation work, and makes the "Pre-set filters" meaningful (i.e., Project Explorer can be either a Package Explorer or Navigatior just by toggling the "Java Elements".

Improvements:
* Filters and Customization > Pre-set filters:
  * Add de/select all
  * Add restore defaults

Missing (but I really don't need it):
Navigator has a Sort > [by Name|by Type]
Comment 4 Lars Vogel CLA 2019-10-30 14:34:01 EDT
Code contributions via Gerrit are very welcome.
Comment 5 arne anka CLA 2020-07-10 07:25:03 EDT
(In reply to Mattias Bertilsson from comment #2)
> but supporting that use case with a separate re-implemented
> Navigator view might be preferable.

+1
I think, there's a reason why Navigator and Project Explorer are separate views -- and if not intentionally by its creators, so certainly for people using them in their everyday work.

So, simply having a button the switches a bunch of settings in the same view will not address the scenario where people use both views at the same time.
Comment 6 Prithvi Joseph CLA 2020-10-07 10:30:04 EDT
Project explorer view does not provide the same functionality as Navigator.

I modify the file name from A.java to A.java.bkp to exclude the class file to be generated for a particular java file when i research with multiple versions of the java file which are autowired.

Without the navigator view I need to go into the file system to make the change and it is painful and time consuming.
Comment 7 Alexander Kurtakov CLA 2022-02-16 09:12:14 EST
(In reply to Prithvi Joseph from comment #6)
> Project explorer view does not provide the same functionality as Navigator.
> 
> I modify the file name from A.java to A.java.bkp to exclude the class file
> to be generated for a particular java file when i research with multiple
> versions of the java file which are autowired.
> 
> Without the navigator view I need to go into the file system to make the
> change and it is painful and time consuming.

I don't understand what exactly you can't do with Project explorer.
Comment 8 Manoj N Palat CLA 2022-02-17 00:05:39 EST
I would think the option of having two simultaenous views out of the box with preset filters in project explorer - see bug 549953 comment 33 or the comment 3/4 of this bug - Essentially I would like to have a package explorer view(no-clutter) as well as a navigator view(need to see all files). I understand from the comments that the filters can be selected/deselected to achieve the same, but a pre-set filter would go a long way to help users (like me) who have been used to the navigator window sitting alongside the package explorer.
Comment 9 Jay Arthanareeswaran CLA 2022-02-17 00:18:48 EST
(In reply to Alexander Kurtakov from comment #7)
> I don't understand what exactly you can't do with Project explorer.

If I wanted to open the .classpath/.project or any of the compiled binaries from the bin folder, I need the navigator. Neither the package explorer nor the project explorer provide this functionality.

Of course, you can use the "Open Resources" dialog, but that obviously doesn't give you the option of inspecting what is present there.
Comment 10 Jay Arthanareeswaran CLA 2022-02-17 00:23:42 EST
(In reply to Jay Arthanareeswaran from comment #9)
> If I wanted to open the .classpath/.project or any of the compiled binaries
> from the bin folder, I need the navigator. Neither the package explorer nor
> the project explorer provide this functionality.

Correction: For the .classpath and .project, I can exclude the filter and start seeing them in the view, but not for the binaries.
Comment 11 Sravan Kumar Lakkimsetti CLA 2022-02-17 00:47:17 EST
(In reply to Jay Arthanareeswaran from comment #10)
> (In reply to Jay Arthanareeswaran from comment #9)
> > If I wanted to open the .classpath/.project or any of the compiled binaries
> > from the bin folder, I need the navigator. Neither the package explorer nor
> > the project explorer provide this functionality.
> 
> Correction: For the .classpath and .project, I can exclude the filter and
> start seeing them in the view, but not for the binaries.

In project explorer we have .class and .resources filters unchecking them we can see .classpath, .settings, .project and *.class in the project explorer
Comment 12 Alexander Kurtakov CLA 2022-02-17 00:51:06 EST
(In reply to Jay Arthanareeswaran from comment #10)
> (In reply to Jay Arthanareeswaran from comment #9)
> > If I wanted to open the .classpath/.project or any of the compiled binaries
> > from the bin folder, I need the navigator. Neither the package explorer nor
> > the project explorer provide this functionality.
> 
> Correction: For the .classpath and .project, I can exclude the filter and
> start seeing them in the view, but not for the binaries.

Uncheck "Java output folders" and *.class" filters
Comment 13 Jay Arthanareeswaran CLA 2022-02-17 00:52:35 EST
(In reply to Sravan Kumar Lakkimsetti from comment #11)
> In project explorer we have .class and .resources filters unchecking them we
> can see .classpath, .settings, .project and *.class in the project explorer

I had tried that but it still doesn't expose the .class files in the bin folder. I just went back and noticed there's another filter that is affecting this - "Java output folders". So, to be able to see the .class file, one has to uncheck both the ".class resources" and one I just mentioned. Odd behavior, but it works. Bottomline, I withdraw my concern from comment #9.
Comment 14 Alexander Kurtakov CLA 2022-02-17 00:56:25 EST
So do I get it correct that a single click "Disable all filters" functionality is what you are missing?
Comment 15 Jay Arthanareeswaran CLA 2022-02-17 01:09:34 EST
(In reply to Alexander Kurtakov from comment #14)
> So do I get it correct that a single click "Disable all filters"
> functionality is what you are missing?

Probably. Interestingly, of the three we are talking about, only the project explorer is missing this from the Filters dialog.

(In reply to Jay Arthanareeswaran from comment #13)
> I had tried that but it still doesn't expose the .class files in the bin
> folder. I just went back and noticed there's another filter that is
> affecting this - "Java output folders". So, to be able to see the .class
> file, one has to uncheck both the ".class resources" and one I just
> mentioned. Odd behavior, but it works. 

I think we should let the user know somehow that just unchecking one option is not enough to see a .class file from the bin folder. By default, a Java project gets the .class file inside the bin folder. So, why have two separate options? May be there's some rationale/history behind this that I don't know. When I went to the Filters page, I saw the *.class file option, unchecked that and thought that ought to do but that wasn't. Not helping the matter is, the "Java output folder" option is further down the list.
Comment 16 Mattias Bertilsson CLA 2022-02-17 04:16:55 EST
(In reply to Alexander Kurtakov from comment #14)
> So do I get it correct that a single click "Disable all filters"
> functionality is what you are missing?

That, and a "Show only Resources" (disabling everything except Resources on the Content tab of the "Filters and Customization" dialog), possibly combined into one.
Comment 17 Alexander Kurtakov CLA 2022-02-17 04:22:36 EST
(In reply to Mattias Bertilsson from comment #16)
> (In reply to Alexander Kurtakov from comment #14)
> > So do I get it correct that a single click "Disable all filters"
> > functionality is what you are missing?
> 
> That, and a "Show only Resources" (disabling everything except Resources on
> the Content tab of the "Filters and Customization" dialog), possibly
> combined into one.

Cool, thanks for the output. At least now we have a clear requirement.