use of org.eclipse.core.commands.operations.IUndoableOperation in project hale by halestudio.
the class AlignmentServiceUndoSupport method addCell.
/**
* @see AlignmentServiceDecorator#addCell(MutableCell)
*/
@Override
public synchronized void addCell(MutableCell cell) {
if (cell == null) {
return;
}
IUndoableOperation operation = new AddCellOperation(cell);
executeOperation(operation);
}
use of org.eclipse.core.commands.operations.IUndoableOperation in project xtext-eclipse by eclipse.
the class ProblemHoverTest method testBug357516_bookmark.
@Test
public void testBug357516_bookmark() throws Exception {
IResource resource = editor.getResource();
HashMap<String, Object> attributes = new HashMap<String, Object>();
attributes.put(IMarker.MESSAGE, CUSTOM_MARKER_TEST_MESSAGE);
attributes.put(IMarker.LINE_NUMBER, 1);
attributes.put(IMarker.LOCATION, resource.getFullPath().toPortableString());
IUndoableOperation operation = new CreateMarkersOperation(IMarker.BOOKMARK, attributes, resource, CUSTOM_MARKER_TEST_MESSAGE);
IOperationHistory operationHistory = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
try {
operationHistory.execute(operation, null, null);
} catch (ExecutionException x) {
fail(x.getMessage());
}
String hoverInfo = hover.getHoverInfo(editor.getInternalSourceViewer(), 0);
assertNotNull(hoverInfo);
assertTrue(hoverInfo.contains(CUSTOM_MARKER_TEST_MESSAGE));
}
Aggregations