In our eclipse plugin we are using a problem view extending ProblemView. One of the action attached to the rows in the view is properties. When user clicking on this action she/he should see the information about the problem. The problem is that the objects showed in ProblemView are of a type which has considered to be use in eclipse internally: org.eclipse.ui.views.markers.internal.ProblemMarker
and using it will cause a warning:
Discouraged access: The type ProblemMarker is not accessible due to restriction on required library org.eclipse.ui.ide_3.7.0.v20110809-1737.jar
Anybody knows how we can take the rows in ProblemView as IMarker or something like that without getting this warning?
The code I want to replace is here:
Object obj = getStructuredSelection().getFirstElement();
if (!(obj instanceof ProblemMarker)) {
return;
}
ProblemMarker marker = (ProblemMarker) obj;
TrayDialog dialog = new TrayDialog(this.part.getSite().getShell(),
Messages.propertiesTitle);
dialog.setMarker(marker.getMarker());
dialog.open();