1 11 package org.eclipse.jdt.internal.ui.javaeditor; 12 13 import org.eclipse.core.runtime.Assert; 14 15 import org.eclipse.jface.action.IAction; 16 17 import org.eclipse.jface.text.IRegion; 18 import org.eclipse.jface.text.hyperlink.IHyperlink; 19 20 21 26 public class JavaElementHyperlink implements IHyperlink { 27 28 private final IRegion fRegion; 29 private final IAction fOpenAction; 30 31 32 35 public JavaElementHyperlink(IRegion region, IAction openAction) { 36 Assert.isNotNull(openAction); 37 Assert.isNotNull(region); 38 39 fRegion= region; 40 fOpenAction= openAction; 41 } 42 43 47 public IRegion getHyperlinkRegion() { 48 return fRegion; 49 } 50 51 55 public void open() { 56 fOpenAction.run(); 57 } 58 59 63 public String getTypeLabel() { 64 return null; 65 } 66 67 71 public String getHyperlinkText() { 72 return null; 73 } 74 } 75 | Popular Tags |