Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Refresh Editor after deleting IMarkers.
Refresh Editor after deleting IMarkers. [message #761600] Tue, 06 December 2011 18:06
Aleksandar Toshovski is currently offline Aleksandar Toshovski
Messages: 38
Registered: December 2011
Member
Hi,

following the great IBM tutorial[Best practices for developing Eclipse plugins] I managed to create Markers in the the editor. However I I've tried to delete them. The problem is, that the opened files don't get updated after the deleting(When I close and reopen the file the markers are deleted). How can I invoke an update on the marker bar?


public class SynchronizeEventsAction implements IWorkbenchWindowActionDelegate {


	public SynchronizeEventsAction() {
		super();
	}

	@Override
	public void run(IAction action) {
		deleteMarkers();
	}

	private void deleteMarkers() {
		IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
				.getProjects();
		for (IProject project : projects) {
			try {
				project.deleteMarkers(MarkerFactory.MARKER, false,
						IProject.DEPTH_INFINITE);
			} catch (CoreException e) {
				e.printStackTrace();
			}
		}
	}

	@Override
	public void selectionChanged(IAction action, ISelection selection) {

	}

	@Override
	public void dispose() {

	}

	@Override
	public void init(IWorkbenchWindow window) {
	}

}


Previous Topic:Exception while testing RCP product
Next Topic:RCP Exception
Goto Forum:
  


Current Time: Mon Oct 20 08:10:15 GMT 2014

Powered by FUDForum. Page generated in 0.01423 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software