Bug 29846 Package Explorer shows leading slash in status line for resource files
build I20030115 - load org.eclipse.jface as source - in the Package Explorer, select org.eclipse.jface/src - the status line shows: org.eclipse.jface/src - select org.eclipse.jface/scripts - the status line shows: /org.eclipse.jface/scripts - select org.eclipse.jface/src/org.eclipse.jface.action/Action.java - the status line shows: org.eclipse.jface.action.Action.java - org.eclipse.jface/src - select org.eclipse.jface/src/org.eclipse.jface.action/package.html - the status line shows: /org.eclipse.jface/src/org/eclipse/jface/action/package.html Leading slashes should be omitted. We generally try to avoid using leading slashes in the UI. Compare with the Navigator. Also, note that using / to separate segments in package names leads to an inconsistency with what is presented in the view. The view shows "org.eclipse.jface.action" but the status line shows "org/eclipse/jface/action". Could still follow the same format as for Java files, showing pkg.file - srcFolder. e.g. org.eclipse.jface.action.messages.properties - org.eclipse.jface/src or: messages.properties - org.eclipse.jface.action - org.eclipse.jface/src
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/StatusBarUpdater.java
/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
package org.eclipse.jdt.internal.ui.viewsupport;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
/**
 * Add the <code>StatusBarUpdater</code> to your ViewPart to have the statusbar
 * describing the selected elements.
 */
public class StatusBarUpdater implements ISelectionChangedListener {