diff --git a/org.eclipse.photran.cdtinterface/icons/obj16/f_file_obj.gif b/org.eclipse.photran.cdtinterface/icons/obj16/f_file_obj.gif
index ac45f38..5981749 100644
--- a/org.eclipse.photran.cdtinterface/icons/obj16/f_file_obj.gif
+++ b/org.eclipse.photran.cdtinterface/icons/obj16/f_file_obj.gif
Binary files differ
diff --git a/org.eclipse.photran.cdtinterface/plugin.xml b/org.eclipse.photran.cdtinterface/plugin.xml
index 53b9f5e..99e98a6 100644
--- a/org.eclipse.photran.cdtinterface/plugin.xml
+++ b/org.eclipse.photran.cdtinterface/plugin.xml
@@ -450,7 +450,7 @@
           activeByDefault="true"
           id="org.eclipse.photran.ui.navigator.content"
           contentProvider="org.eclipse.cdt.internal.ui.navigator.CNavigatorContentProvider"
-          labelProvider="org.eclipse.cdt.internal.ui.navigator.CNavigatorLabelProvider"
+          labelProvider="org.eclipse.photran.internal.cdtinterface.ui.FNavigatorLabelProvider"
           name="Fortran Elements"
           priority="high">
          <triggerPoints>
diff --git a/org.eclipse.photran.cdtinterface/src/org/eclipse/photran/internal/cdtinterface/ui/FNavigatorLabelProvider.java b/org.eclipse.photran.cdtinterface/src/org/eclipse/photran/internal/cdtinterface/ui/FNavigatorLabelProvider.java
new file mode 100644
index 0000000..badcd22
--- /dev/null
+++ b/org.eclipse.photran.cdtinterface/src/org/eclipse/photran/internal/cdtinterface/ui/FNavigatorLabelProvider.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2018 TODO COMPANY NAME and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    gw6 (TODO COMPANY NAME) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.photran.internal.cdtinterface.ui;
+
+import org.eclipse.cdt.core.model.IArchiveContainer;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.IBinaryContainer;
+import org.eclipse.cdt.core.model.IBinaryModule;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.ui.cview.CViewMessages;
+import org.eclipse.cdt.internal.ui.navigator.CNavigatorProblemsLabelDecorator;
+import org.eclipse.cdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
+import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+import org.eclipse.ui.navigator.ICommonContentExtensionSite;
+import org.eclipse.ui.navigator.ICommonLabelProvider;
+
+/**
+ * 
+ * @author gw6
+ */
+@SuppressWarnings("restriction")
+public class FNavigatorLabelProvider extends FViewLabelProvider implements ICommonLabelProvider
+{
+
+    /**
+     * Create a default label provider.
+     */
+    public FNavigatorLabelProvider()
+    {
+        super(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS,
+            AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | CElementImageProvider.SMALL_ICONS);
+        addLabelDecorator(new CNavigatorProblemsLabelDecorator());
+    }
+
+    /*
+     * @see org.eclipse.ui.navigator.ICommonLabelProvider#init(org.eclipse.ui.navigator.
+     * ICommonContentExtensionSite)
+     */
+    @Override
+    public void init(ICommonContentExtensionSite extensionSite)
+    {
+        // no-op
+    }
+
+    /*
+     * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
+     */
+    @Override
+    public void restoreState(IMemento memento)
+    {
+        // no-op
+    }
+
+    /*
+     * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
+     */
+    @Override
+    public void saveState(IMemento memento)
+    {
+        // no-op
+    }
+
+    /*
+     * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
+     */
+    @Override
+    public String getDescription(Object element)
+    {
+        if (element instanceof IResource)
+        {
+            return ((IResource)element).getFullPath().makeRelative().toString();
+        }
+        else if (element instanceof ICElement)
+        {
+            ICElement celement = (ICElement)element;
+            IResource res = celement.getAdapter(IResource.class);
+            if (res != null)
+            {
+                return res.getFullPath().toString();
+            }
+            else if (celement.getElementType() == ICElement.C_VCONTAINER)
+            {
+                if (celement instanceof IBinaryContainer)
+                {
+                    ICProject cproj = celement.getCProject();
+                    if (cproj != null) { return cproj.getPath() + CViewMessages.CView_binaries; }
+                }
+                else if (celement instanceof IArchiveContainer)
+                {
+                    ICProject cproj = celement.getCProject();
+                    if (cproj != null) { return cproj.getPath() + CViewMessages.CView_archives; }
+                }
+                else if (celement instanceof IBinaryModule)
+                {
+                    IBinary bin = ((IBinaryModule)celement).getBinary();
+                    return bin.getPath() + ":" + celement.getElementName(); //$NON-NLS-1$
+                }
+            }
+            else if (celement
+                .getElementType() > ICElement.C_UNIT) { return celement.getPath().toString()
+                    + " - [" + celement.getElementName() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+            }
+            return celement.getElementName();
+        }
+        else if (element instanceof IWorkbenchAdapter)
+        {
+            IWorkbenchAdapter wAdapter = (IWorkbenchAdapter)element;
+            return wAdapter.getLabel(element);
+        }
+        return null;
+    }
+
+}
