1 11 package org.eclipse.jdt.internal.ui.text.correction; 12 13 import org.eclipse.swt.graphics.Image; 14 15 import org.eclipse.jdt.core.ICompilationUnit; 16 import org.eclipse.jdt.core.dom.ITypeBinding; 17 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite; 18 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition; 19 20 28 public class LinkedCorrectionProposal extends ASTRewriteCorrectionProposal { 29 30 40 public LinkedCorrectionProposal(String name, ICompilationUnit cu, ASTRewrite rewrite, int relevance, Image image) { 41 super(name, cu, rewrite, relevance, image); 42 } 43 44 52 public void addLinkedPosition(ITrackedNodePosition position, boolean isFirst, String groupID) { 53 getLinkedProposalModel().getPositionGroup(groupID, true).addPosition(position, isFirst); 54 } 55 56 60 public void setEndPosition(ITrackedNodePosition position) { 61 getLinkedProposalModel().setEndPosition(position); 62 } 63 64 71 public void addLinkedPositionProposal(String groupID, String proposal, Image image) { 72 getLinkedProposalModel().getPositionGroup(groupID, true).addProposal(proposal, image, 10); 73 } 74 75 84 public void addLinkedPositionProposal(String groupID, String displayString, String proposal, Image image) { 85 addLinkedPositionProposal(groupID, proposal, image); 86 } 87 88 93 public void addLinkedPositionProposal(String groupID, ITypeBinding type) { 94 getLinkedProposalModel().getPositionGroup(groupID, true).addProposal(type, getCompilationUnit(), 10); 95 } 96 } 97 | Popular Tags |