// Path: src/com/equadon/intellij/mips/icons/MipsIcons.java
// public interface MipsIcons {
//   Icon FILE = IconLoader.getIcon("/icons/mips-file-16.png");
//   Icon LABEL = IconLoader.getIcon("/icons/mips-label-16.png");
//   Icon DIRECTIVE = IconLoader.getIcon("/icons/mips-directive-16.png");
//   Icon INSTRUCTION = IconLoader.getIcon("/icons/mips-instruction-16.png");
// }
// 
// Path: src/com/equadon/intellij/mips/lang/psi/impl/MipsNamedElementImpl.java
// public class MipsNamedElementImpl extends MipsElementImpl implements MipsNamedElement {
//   public MipsNamedElementImpl(@NotNull ASTNode node) {
//     super(node);
//   }
// 
//   @Override
//   public String getName() {
//     PsiElement element = getNameIdentifier();
//     if (element != null)
//       return getValue(element);
// 
//     return null;
//   }
// 
//   @Nullable
//   @Override
//   public PsiElement getNameIdentifier() {
//     return getFirstChild();
//   }
// 
//   @Override
//   public PsiElement setName(@NotNull String name) throws IncorrectOperationException {
//     return null;
//   }
// 
//   public static String getValue(PsiElement element) {
//     return element.getText();
//   }
// }


import com.equadon.intellij.mips.icons.MipsIcons;
import com.equadon.intellij.mips.lang.psi.impl.MipsNamedElementImpl;
import com.intellij.lang.ASTNode;
import com.intellij.navigation.ItemPresentation;
import com.intellij.psi.NavigatablePsiElement;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;

  @Override
  public boolean canNavigate() {
    return true;
  }

  @Override
  public boolean canNavigateToSource() {
    return true;
  }

  @Override
  public ItemPresentation getPresentation() {
    return new ItemPresentation() {
      @Nullable
      @Override
      public String getPresentableText() {
        return getName();
      }

      @Nullable
      @Override
      public String getLocationString() {
        PsiFile file = getContainingFile();
        return (file == null) ? "(unknown)" : "(" + file.getName() + ")";
      }

      @Nullable
      @Override
      public Icon getIcon(boolean unused) {
// Path: src/com/equadon/intellij/mips/icons/MipsIcons.java
// public interface MipsIcons {
//   Icon FILE = IconLoader.getIcon("/icons/mips-file-16.png");
//   Icon LABEL = IconLoader.getIcon("/icons/mips-label-16.png");
//   Icon DIRECTIVE = IconLoader.getIcon("/icons/mips-directive-16.png");
//   Icon INSTRUCTION = IconLoader.getIcon("/icons/mips-instruction-16.png");
// }
// 
// Path: src/com/equadon/intellij/mips/lang/psi/impl/MipsNamedElementImpl.java
// public class MipsNamedElementImpl extends MipsElementImpl implements MipsNamedElement {
//   public MipsNamedElementImpl(@NotNull ASTNode node) {
//     super(node);
//   }
// 
//   @Override
//   public String getName() {
//     PsiElement element = getNameIdentifier();
//     if (element != null)
//       return getValue(element);
// 
//     return null;
//   }
// 
//   @Nullable
//   @Override
//   public PsiElement getNameIdentifier() {
//     return getFirstChild();
//   }
// 
//   @Override
//   public PsiElement setName(@NotNull String name) throws IncorrectOperationException {
//     return null;
//   }
// 
//   public static String getValue(PsiElement element) {
//     return element.getText();
//   }
// }


// Path: src/com/equadon/intellij/mips/lang/psi/mixins/MipsLabelDefinitionMixin.java
import com.equadon.intellij.mips.icons.MipsIcons;
import com.equadon.intellij.mips.lang.psi.impl.MipsNamedElementImpl;
import com.intellij.lang.ASTNode;
import com.intellij.navigation.ItemPresentation;
import com.intellij.psi.NavigatablePsiElement;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;


  @Override
  public boolean canNavigate() {
    return true;
  }

  @Override
  public boolean canNavigateToSource() {
    return true;
  }

  @Override
  public ItemPresentation getPresentation() {
    return new ItemPresentation() {
      @Nullable
      @Override
      public String getPresentableText() {
        return getName();
      }

      @Nullable
      @Override
      public String getLocationString() {
        PsiFile file = getContainingFile();
        return (file == null) ? "(unknown)" : "(" + file.getName() + ")";
      }

      @Nullable
      @Override
      public Icon getIcon(boolean unused) {
        return MipsIcons.LABEL;