1 11 12 package org.eclipse.pde.internal.ui.editor.contentassist; 13 14 import org.eclipse.jface.fieldassist.IContentProposal; 15 import org.eclipse.swt.graphics.Image; 16 17 21 public class TypeContentProposal implements IContentProposal { 22 23 private String fLabel; 24 25 private String fContent; 26 27 private String fDescription; 28 29 private Image fImage; 30 31 34 public TypeContentProposal(String label, String content, 35 String description, Image image) { 36 fLabel = label; 37 fContent = content; 38 fDescription = description; 39 fImage = image; 40 } 41 42 45 public String getContent() { 46 return fContent; 47 } 48 49 52 public int getCursorPosition() { 53 if (fContent != null) { 54 return fContent.length(); 55 } 56 return 0; 57 } 58 59 62 public String getDescription() { 63 return fDescription; 64 } 65 66 69 public String getLabel() { 70 return fLabel; 71 } 72 73 76 public Image getImage() { 77 return fImage; 78 } 79 80 83 public String toString() { 84 return fLabel; 85 } 86 87 } 88 | Popular Tags |