use of org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor in project xtext-eclipse by eclipse.
the class ConditionPage method createTypeSpecificEditors.
@Override
protected void createTypeSpecificEditors(Composite parent) {
try {
IJavaBreakpoint breakpoint = getBreakpoint();
IMarker marker = breakpoint.getMarker();
Object sourceUri = marker.getAttribute(StratumBreakpointAdapterFactory.ORG_ECLIPSE_XTEXT_XBASE_SOURCE_URI);
if (sourceUri != null) {
setTitle("Condition");
final JavaBreakpointConditionEditor editor = new JavaBreakpointConditionEditor();
editor.createControl(parent);
editor.addPropertyListener(new IPropertyListener() {
@Override
public void propertyChanged(Object source, int propId) {
IStatus status = editor.getStatus();
if (status.isOK()) {
if (fPrevMessage != null) {
removeErrorMessage(fPrevMessage);
fPrevMessage = null;
}
} else {
fPrevMessage = status.getMessage();
addErrorMessage(fPrevMessage);
}
}
});
URI uri = URI.createURI(String.valueOf(sourceUri));
JavaBreakPointProvider breakPointProvider = registry.getResourceServiceProvider(uri).get(JavaBreakPointProvider.class);
editor.setInput(breakPointProvider.getBreakpointWithJavaLocation((IJavaStratumLineBreakpoint) breakpoint));
// set this editor only if it was correctly initialized
this.editor = editor;
}
} catch (CoreException e) {
setErrorMessage(e.getMessage());
}
}
Aggregations