本文整理汇总了Java中org.eclipse.ui.IMarkerResolution2类的典型用法代码示例。如果您正苦于以下问题:Java IMarkerResolution2类的具体用法?Java IMarkerResolution2怎么用?Java IMarkerResolution2使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IMarkerResolution2类属于org.eclipse.ui包,在下文中一共展示了IMarkerResolution2类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getResolutions
import org.eclipse.ui.IMarkerResolution2; //导入依赖的package包/类
@Override
public IMarkerResolution2[] getResolutions(IMarker marker) {
if (!hasResolutions(marker)) {
return NO_RESOLUTIONS;
}
return new IMarkerResolution2[] { new BadLinkMarkerCorrection(marker) };
}
示例2: getAdditionalProposalInfo
import org.eclipse.ui.IMarkerResolution2; //导入依赖的package包/类
public String getAdditionalProposalInfo() {
if (fResolution instanceof IMarkerResolution2) {
return ((IMarkerResolution2) fResolution).getDescription();
}
if (fResolution instanceof IJavaCompletionProposal) {
return ((IJavaCompletionProposal) fResolution).getAdditionalProposalInfo();
}
try {
String problemDesc= (String) fMarker.getAttribute(IMarker.MESSAGE);
return Messages.format(CorrectionMessages.MarkerResolutionProposal_additionaldesc, problemDesc);
} catch (CoreException e) {
JavaPlugin.log(e);
}
return null;
}
示例3: getImage
import org.eclipse.ui.IMarkerResolution2; //导入依赖的package包/类
public Image getImage() {
if (fResolution instanceof IMarkerResolution2) {
return ((IMarkerResolution2) fResolution).getImage();
}
if (fResolution instanceof IJavaCompletionProposal) {
return ((IJavaCompletionProposal) fResolution).getImage();
}
return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
}