| Summary: | Resource exclusions don't interact well with aliases | ||
|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | James Blackburn <jamesblackburn+eclipse> |
| Component: | Resources | Assignee: | Platform-Resources-Inbox <platform-resources-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | serge, sergebeauchamp |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux-GTK | ||
| Whiteboard: | |||
|
Description
James Blackburn
Adding Serge I was going through building a flexible project with a user this am -- basically mirroring their MSVC project. One way we do this is have an outer project which contains all the source, so the user can find files with ctrl-shift-R. I saw weirdness between the inner project and outer project: - Files popped in and out of existence - Closing the outer project made files in a linked folder disappear - Resource filters effectiveness comes and goes - I was filtering for *.c in some places and *.h in others, and saw all files appearing and disappearing. Received the following exception when dragging a folder from outer project into a group in inner project: org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:519) at org.eclipse.ui.actions.CopyFilesAndFoldersOperation.performCopy(CopyFilesAndFoldersOperation.java:1224) at org.eclipse.ui.actions.CopyFilesAndFoldersOperation.copyResources(CopyFilesAndFoldersOperation.java:1739) at org.eclipse.ui.actions.CopyFilesAndFoldersOperation.access$1(CopyFilesAndFoldersOperation.java:1693) at org.eclipse.ui.actions.CopyFilesAndFoldersOperation$2.run(CopyFilesAndFoldersOperation.java:613) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: java.lang.NullPointerException at org.eclipse.core.internal.resources.AliasManager$1.compare(AliasManager.java:494) at java.util.TreeMap.compare(TreeMap.java:1093) at java.util.TreeMap.access$900(TreeMap.java:81) at java.util.TreeMap$SubMap.<init>(TreeMap.java:850) at java.util.TreeMap.subMap(TreeMap.java:754) at org.eclipse.core.internal.resources.AliasManager$LocationMap.matchingPrefixDo(AliasManager.java:171) at org.eclipse.core.internal.resources.AliasManager.computeDeepAliases(AliasManager.java:447) at org.eclipse.core.internal.resources.AliasManager.updateAliases(AliasManager.java:675) at org.eclipse.core.internal.resources.Resource.move(Resource.java:1710) at org.eclipse.ui.ide.undo.WorkspaceUndoUtil.move(WorkspaceUndoUtil.java:663) at org.eclipse.ui.ide.undo.MoveResourcesOperation.move(MoveResourcesOperation.java:136) at org.eclipse.ui.ide.undo.MoveResourcesOperation.doExecute(MoveResourcesOperation.java:104) at org.eclipse.ui.ide.undo.AbstractWorkspaceOperation$1.run(AbstractWorkspaceOperation.java:206) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1952) at org.eclipse.ui.ide.undo.AbstractWorkspaceOperation.execute(AbstractWorkspaceOperation.java:204) at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511) ... 5 more For some reason uri1 must be null: IPath path1 = new Path(uri1.getPath()); [My AliasManager is ever-so-slightly different from yours (it includes a couple fixes from 3.5) but I don't think these are to blame: http://github.com/jamesblackburn/eclipse-core-resources/blob/7d4228716c94b8f5936b0dcd433296bb9f533dfc/src/org/eclipse/core/internal/resources/AliasManager.java ] On an unrelated note, I'm finding a bunch of other places in CDT which assume that getLocation(URI()) will return non-null. It seems that the API clearly states this is possible *sigh*. (In reply to comment #2) org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) > Caused by: java.lang.NullPointerException > at > org.eclipse.core.internal.resources.AliasManager$1.compare(AliasManager.java:494) > at java.util.TreeMap.compare(TreeMap.java:1093) > at java.util.TreeMap.access$900(TreeMap.java:81) > at java.util.TreeMap$SubMap.<init>(TreeMap.java:850) > at java.util.TreeMap.subMap(TreeMap.java:754) > at > > For some reason uri1 must be null: > IPath path1 = new Path(uri1.getPath()); I've reproduced this in my own Workspace now, copying linked resources from a folder into a group. The projects overlap which is why the alias manager is getting involved (I think). Both uri1 and uri2 are NullFileStores. Their paths have device=null segments=String[1]={link_name} Looks like this is related to bug266712 comment 3 -- which shows the same NullFileStore#toURI failing... This is a duplicate of bug 267201, and should now be fixed as well. *** This bug has been marked as a duplicate of bug 267201 *** |