Bug 359166 - [package explorer] Package Explorer does not automatically remove deleted tree items
Summary: [package explorer] Package Explorer does not automatically remove deleted tre...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Windows 7
: P5 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-27 22:40 EDT by Randall Becker CLA
Modified: 2022-06-23 09:19 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randall Becker CLA 2011-09-27 22:40:42 EDT
The JDT Package Explorer is not cleaning up when a project is expanded, there is a hidden folder as a member, and a file is deleted. A blank tree entry is left as an orphan in the tree after the delete. The blank tree item can be selected but use no properties and cannot be delete. It can be removed if ECLIPSE is restarted, if the project is refreshed from the Package Explorer (not via refreshLocal), or is collapsed and then expanded.

To Reproduce:

1. Create a project.
2. Create a hidden derived folder in the project.
3. Create a visible file, test.txt, for example.
4. Select the visible file in the Package Explorer.
5. Delete the visible file.
Comment 1 Dani Megert CLA 2011-09-28 04:39:28 EDT
>2. Create a hidden derived folder in the project
How do you hide it?
Comment 2 Randall Becker CLA 2011-09-28 07:14:39 EDT
The hidden IFolder can be created using the following snippet:

void createHidden(IProject project,IProgressMonitor monitor) throws CoreException {
	IFolder folder = project.findMember(".myhidden");
	if (!folder.exists) {
		folder.create(true,true,monitor);
		folder.setHidden(true);
		folder.setDerived(true,monitor);
	}
}
Comment 3 Dani Megert CLA 2011-09-28 08:12:35 EDT
(In reply to comment #2)
> The hidden IFolder can be created using the following snippet:

I meant through the UI.
Comment 4 Randall Becker CLA 2011-09-28 08:20:02 EDT
I don't know of a way to mark a folder as hidden from the UI. This situation came up during plug-in development, so we use invoke the method below to set up the test condition.
Comment 5 Eclipse Genie CLA 2020-06-23 19:27:40 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Eclipse Genie CLA 2022-06-23 09:19:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.