@NotNull @Override public Navigatable createNavigatable(@NotNull Project project) { if (ALTERNATIVE_SOURCE_KEY.get(myFile) != null) { return new OpenFileDescriptor(project, getFile(), getLine(), 0); } return XSourcePositionImpl.doCreateOpenFileDescriptor(project, this); }
@NotNull @Override public VirtualFile getFile() { VirtualFile file = ALTERNATIVE_SOURCE_KEY.get(myFile); if (file != null) { return file; } return myFile; }
public static void setAlternativeSource(VirtualFile source, VirtualFile dest) { ALTERNATIVE_SOURCE_KEY.set(source, dest); ALTERNATIVE_SOURCE_KEY.set(dest, null); }