I want to hide(using program) collapse all, view menu and Link with editor option available in project explorer for my eclipse Product - eclipse

I want to hide(using program) collapse all, view menu and Link with editor option available in project explorer for my Eclipse Product.

Related

How to edit the "New" submenu of the right-click menu in Eclipse IDE?

Is it possible to edit the "New" submenu when I use the right-clik on a project in the Project Explorer ? "Customize perspective" settings don't seem to have any effect on it. In my Eclipse on Ubuntu I have directly the wizards that I want in this submenu, but in my Eclipse on Windows I have to click on "Other..." to find the right wizard. Thanks.
open eclipse, then go to Window menu, select Customize perspective...
a windows appears. it has for tabs.
Tool bar visiblity
Menu visiblity
Command Groups Availablity
Shortcuts
select Menu visiblity tab, it will shows all menus with tree view.
then expand tree view of File then do same for the New which is sub tree of File.
now select All of those project types that you want, then click Ok.

Eclipse Mars - imported projects don't show up in Project/Enterprise Explorer

I currently have 48 projects in my workspace. All are cloned git repos that had existing projects that were then imported into Eclipse.
The last three repos that I've imported into Eclipse have imported and migrated successfully but don't show up in either the Project or Enterprise Explorer views. I can see that they exist in the .metadata/.plugins/org.eclipse.core.resources/.projects folder.
I can search the projects and create a working set, and I can add the EAR files to the server, and I can open the files, but I can't do anything that I would normally do from the Project Explorer, including viewing their properties or deleting them.
I had thought that Eclipse might have an upper limit on how many projects could be viewed, but my co-worker says she has 107 projects currently in her workspace.
Maybe the projects are hidden by an active Working Set or by Focus on Active Task.
From the first link:
How to change Eclipse's "Project Explorer" "Filters and Customization" view settings to force projects and files and folders to show up and not be hidden, such as nested projects
Tested in Eclipse Version 2021-06 (4.20.0), Build ID: 20210612-2011 on Linux Ubuntu 18.04.
Quick Summary
Go to the "Project Explorer" tab, click the 3 vertical dots in the top-right corner of that pane, then go to "Filters and Customization...", as shown here:
Uncheck the box for "Nested Projects: hide top-level project if shown as nested" and "Nested Projects: hide folders when project is shown as nested", and click "OK":
Details
I'm having this exact problem in Eclipse Version 2021-06 (4.20.0), Build ID: 20210612-2011 on Linux Ubuntu 18.04.
It turns out it's because of the Project Explorer "Filters and Customization..." settings, as I learned from #howlger's answer.
After adding a code repository directory as a project, I can see it showing up in the deprecated "Navigator" tab, shown as "Navigator (Deprecated)" in Eclipse here (I have blurred images for privacy):
However, it does not show up in the "Project Explorer" tab, which is shown below!
The problem is that the "Project Explorer" tab's "Filters and Customization..." settings are filtering out this project and not showing it. In my particular case, that is because the project I am adding is a subrepo within another git repo, which means it is a project nested within another Eclipse project, and my view settings are mistakenly set to exclude all "nested projects". Your case or reason may be different, but in either case, if your project is not showing up in your "Project Explorer" tab, then it is likely because your "Filters and Customization" settings are set to exclude it from view.
To fix this for my case, go to the "Project Explorer" tab, click the 3 vertical dots in the top-right corner of that pane, then go to "Filters and Customization...", as shown here:
Next, click the "Pre-set filters" tab, then scroll down and uncheck the box for "Nested Projects: hide top-level project if shown as nested". I recommend you also uncheck the box for "Nested Projects: hide folders when project is shown as nested", but I'm not 100% sure what that one does, as unchecking the other box alone caused my project to show up. Here is a screenshot, with the appropriate areas highlighted in yellow:
Any of the items in this list will be hidden from view in the "Project Explorer" tab if their box is checked. So, go through the list in detail and uncheck anything else you might see fit, if applicable. I took a look and left all the rest of my view settings there as-is.
Click the "OK" button when done, and voila!--my nested and previously-added project now shows up in the "Project Explorer" view!
NB: due to some sort of bug in Eclipse, you may have to repeat the above process every time you close and reopen Eclipse. :( But, you can probably do it faster now from the "Recent Filters" section of the 3-dots menu.
Update: it looks like changing the "Projects Presentation" setting from "Hierarchical" to "Flat" blocks this bug and prevents you from having to fix the "Filters and Customization" setting every time you re-open Eclipse.
Here is how: click the 3 vertical dots menu in the "Project Explorer" window --> "Projects Presentation" --> choose "Flat", as shown below:
Other references
Here is the relevant official Eclipse documentation on this: https://help.eclipse.org/: Showing or hiding files in the Project Explorer view:
Showing or hiding files in the Project Explorer view
You can choose to hide system files or generated class files in one of the navigation views. (System files are those that have only a file extension but no file name, for example .classpath.)
On the toolbar for the Project Explorer, click the Menu button Menu button [3 vertical dots] to open the drop-down menu of display options.
Select Filters and Customization..,.
In the dialog box that opens, select the Filters tab and then select the checkboxes for the types of files that you want to hide or define your own name-based filters in the User filters tab.
In addition, you can restrict the displayed files to a working set.
On the toolbar for the Project Explorer, click the Menu button [3 vertical dots] to open the drop-down menu of display options.
Choose Select Working Set...
Select an existing working set from the list or create a new one by selecting New...
My Q&A on how to blur images in GIMP: Graphic Design: How do I do a privacy blur on a section, selection, or region of an image in GIMP?
My personal Eclipse setup document: Eclipse setup instructions on a new Linux (or other OS) computer: Troubleshooting

How to remove additional class drop down in Eclipse Project Explorer view?

In the Project Explorer view of Eclipse Luna, there's an additional drop down for Java files which represents the class inside the file (the green C icon). It expands when I double click to open a class. I don't need this there. Is there a way to filter this out?
Uncheck Preferences / Java / Appearance / "Show members in Package Explorer" checkbox.
It affect both Package and Project explorer.
Preferences windows with that checkbox
It's possible if you use Package Explorer instead of Project Explorer: go to prefs, Java, Appearance and disable "Show members in Package Explorer".
You can disable various elements in the explorer tree via the View config toolbar button (small white triangle on the toolbar just below the Project Explorer tab); select Customize View... then the Content tab; there you can disable, for example, Java Elements. But doing so will hide all Java-related elements from the Project Explorer tree; if you want that, at that point you should just use the Navigator view instead of Project Explorer. Navigator is just a file-system view of the projects.
There is an option for this. Click to three dots on the right top corner in Project Explorer window, click to "Filters and Customisation", then click to "Content" tab. You will see like that things:
Uncheck "Java Elements" (PHP Elements for Eclipse PDT) then clik to OK button. Then you will see that dropdown triangle shit goes to the hell...

Eclipse plugin development implementation

I work with Eclipse and PyDev plugin.
I want to develop a plugin which adds to the main menu (where File is located), an item "my own custom menu" which contains in it another menu items.
According to some examples, I eventually implemented it by using the extension point of org.eclipse.ui.actionSets.
My goal is when item of "my custom menu" is clicked, it should invoke Eclipse functionality.
for example:
"my custom menu" has menu item called "open new pyDev project".
When "open new pyDev project" is clicked, I want to open the pyDev project creation window that manually is opened by clicking the following Eclipse menu items: File->new->other->PyDev->PyDev Project.
I searched quite a lot and couldn't find the way to do it.
Does someone know how to achieve my goal?
What you want to do is implement a workbench wizard that will add them to the set of workbench wizards; then you can add a perspective extension to add it the the corresponding menu generically.
You have to look up the perspective ID you are using with PyDev, but this is the recommended way to add new wizard items to the corresponding menu.

Eclipse: How to disable outline tree view for files?

Is there a way to disable the outline tree view for files in Eclipse?
I never use it (on purpose at least) and find it to be quite distracting. (I prefer ctrl + O.)
For the Java Package Explorer, there is an option for this in the Preferences:
Go to Preferences -> Java -> Appearance and un-check 'Show members in Package Explorer'.
Alternatively, most of Eclipse's different navigator views offer the ability to Filter what to display. Click on the small triangular "menu" symbol at the top of the view and select "Customize View", or "Filter", depending on the view. You are then presented with a menu where you call select what to show and what to hide.
This works with the Java Package Explorer, Project Explorer, the general Navigator and also with the PyDev Package Explorer View, and probably a few more. This is a bit more manual, but allows for a finer adjustment. (Options what to show and what to hide differ between the different views.)
The creator of PyDev commented on my bug report and this is how you do it:
Select the PyDev perspective and then the Package Explorer (if not already).
Press CTRL + F10
Click on Customize View.
Select PyDev: Nodes: All
Press OK.