1 11 package org.eclipse.ui.internal.console; 12 13 import org.eclipse.jface.text.Position; 14 import org.eclipse.ui.console.ConsolePlugin; 15 import org.eclipse.ui.console.IHyperlink; 16 17 22 public class ConsoleHyperlinkPosition extends Position { 23 24 public static final String HYPER_LINK_CATEGORY = ConsolePlugin.getUniqueIdentifier() + ".CONSOLE_HYPERLINK_POSITION"; 26 private IHyperlink fLink = null; 27 28 public ConsoleHyperlinkPosition(IHyperlink link, int offset, int length) { 29 super(offset, length); 30 fLink = link; 31 } 32 33 public IHyperlink getHyperLink() { 34 return fLink; 35 } 36 37 40 public boolean equals(Object arg) { 41 return arg instanceof ConsoleHyperlinkPosition && super.equals(arg) && getHyperLink().equals(((ConsoleHyperlinkPosition)arg).getHyperLink()); 42 } 43 44 47 public int hashCode() { 48 return super.hashCode() + getHyperLink().hashCode(); 49 } 50 51 } 52 | Popular Tags |