1 11 package org.eclipse.jdt.internal.ui.text.javadoc; 12 13 import org.eclipse.jface.text.ITextViewer; 14 15 import org.eclipse.ui.IEditorPart; 16 17 import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext; 18 19 20 24 public final class JavadocContentAssistInvocationContext extends JavaContentAssistInvocationContext { 25 26 private final int fFlags; 27 28 34 public JavadocContentAssistInvocationContext(ITextViewer viewer, int offset, IEditorPart editor, int flags) { 35 super(viewer, offset, editor); 36 fFlags= flags; 37 } 38 39 45 public int getFlags() { 46 return fFlags; 47 } 48 49 54 public int getSelectionLength() { 55 return getViewer().getSelectedRange().y; 56 } 57 58 61 public boolean equals(Object obj) { 62 if (!super.equals(obj)) 63 return false; 64 65 return fFlags == ((JavadocContentAssistInvocationContext) obj).fFlags; 66 } 67 68 71 public int hashCode() { 72 return super.hashCode() << 2 | fFlags; 73 } 74 75 } 76 | Popular Tags |