@Override public void apply(IDocument document) { fResolution.run(fMarker); }
@Override public void apply(IDocument document) { fResolution.run(fMarker); }
@Override public void apply(IDocument document) { fResolution.run(fMarker); }
public void apply(IDocument document) { fResolution.run(fMarker); }
private void fixMarker(IMarker marker) { ResolutionGenerator resGen = new ResolutionGenerator(); IMarkerResolution[] resolutions = resGen.getResolutions(marker); for (IMarkerResolution resolution : resolutions) { if (!(resolution instanceof MultiFixResolution)) { // To avoid infinite loop resolution.run(marker); break; } } }
@Override public void apply(IDocument document) { if (markerResolution instanceof TextDocumentMarkerResolution) { try { IRegion region = ((TextDocumentMarkerResolution) markerResolution).processFix(document, marker); if (region != null) { sourceViewer.setSelectedRange(region.getOffset(), region.getLength()); } } catch (CoreException e) { Activator.getDefault().getLog().log(e.getStatus()); } } else { markerResolution.run(marker); } }
@Override public void run(final IMarker marker) { try { marker.delete(); marker.getResource().deleteMarkers(PDEMarkerFactory.MARKER_ID, false, IResource.DEPTH_ZERO); marker.getResource().delete(true, new NullProgressMonitor()); //Since the plugin.xml is now deleted, remove the corresponding entry from the build.properties as well IResource buildProperties = marker.getResource().getParent().findMember(IPDEBuildConstants.PROPERTIES_FILE); if (buildProperties == null) return; IMarker removePluginEntryMarker = buildProperties.createMarker(String.valueOf(AbstractPDEMarkerResolution.REMOVE_TYPE)); removePluginEntryMarker.setAttribute(PDEMarkerFactory.BK_BUILD_ENTRY, IBuildEntry.BIN_INCLUDES); removePluginEntryMarker.setAttribute(PDEMarkerFactory.BK_BUILD_TOKEN, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR); IMarkerResolution removeBuildEntryResolution = new RemoveBuildEntryResolution(AbstractPDEMarkerResolution.REMOVE_TYPE, removePluginEntryMarker); removeBuildEntryResolution.run(removePluginEntryMarker); } catch (CoreException e) { PDEPlugin.log(e); } }
/** * Displays a list of resolutions and performs the selection. */ @Override public void run() { IMarker marker = getMarker(); if (marker == null) { return; } getTaskList().cancelEditing(); IMarkerResolution[] resolutions = getResolutions(marker); if (resolutions.length == 0) { MessageDialog.openInformation(getShell(), TaskListMessages.Resolve_title, TaskListMessages.Resolve_noResolutionsLabel); return; } MarkerResolutionSelectionDialog d = new MarkerResolutionSelectionDialog( getShell(), resolutions); if (d.open() != Window.OK) { return; } Object[] result = d.getResult(); if (result != null && result.length > 0) { ((IMarkerResolution) result[0]).run(marker); } }
resolution.run(marker); monitor1.worked(1);