1 11 package org.eclipse.pde.internal.ui.correction; 12 13 import org.eclipse.core.resources.IMarker; 14 import org.eclipse.jface.viewers.IStructuredSelection; 15 import org.eclipse.jface.viewers.StructuredSelection; 16 import org.eclipse.pde.core.IBaseModel; 17 import org.eclipse.pde.internal.ui.PDEUIMessages; 18 import org.eclipse.pde.internal.ui.nls.GetNonExternalizedStringsAction; 19 import org.eclipse.pde.internal.ui.util.SWTUtil; 20 import org.eclipse.swt.custom.BusyIndicator; 21 22 public class ExternalizeStringsResolution extends AbstractPDEMarkerResolution { 23 24 public ExternalizeStringsResolution(int type) { 25 super(type); 26 } 27 28 public void run(final IMarker marker) { 29 BusyIndicator.showWhile(SWTUtil.getStandardDisplay(), new Runnable () { 30 public void run() { 31 GetNonExternalizedStringsAction fGetExternAction = new GetNonExternalizedStringsAction(); 32 IStructuredSelection selection = new StructuredSelection(marker.getResource().getProject()); 33 fGetExternAction.selectionChanged(null, selection); 34 fGetExternAction.run(null); 35 } 36 }); 37 } 38 39 protected void createChange(IBaseModel model) { 40 } 42 43 public String getDescription() { 44 return PDEUIMessages.ExternalizeStringsResolution_desc; 45 } 46 47 public String getLabel() { 48 return PDEUIMessages.ExternalizeStringsResolution_label; 49 } 50 51 } 52 | Popular Tags |