2c00L
2c00L

Reputation: 514

Always show the file path in FilteredResourcesSelectionDialog

In the FilteredResourcesSelectionDialog, some items show the file path beside them in grey color while others don"t show the path.

Why does this happen and how do I make sure that the file paths are always shown?

Upvotes: 1

Views: 79

Answers (1)

greg-449
greg-449

Reputation: 111140

The path is shown when there are multiple entries with the same name. This is to allow you to distinguish the entries.

If you create a class derived from FilteredResourcesSelectionDialog (or anything based on FilteredItemsSelectionDialog) you can override the isDuplicateElement method to control this, for example:

@Override
public boolean isDuplicateElement(Object item)
{
  return true;
}

Upvotes: 3

Related Questions