1 11 package org.eclipse.pde.internal.ui.correction; 12 13 import org.eclipse.core.resources.IMarker; 14 import org.eclipse.core.resources.IProject; 15 import org.eclipse.core.resources.IProjectDescription; 16 import org.eclipse.core.runtime.CoreException; 17 import org.eclipse.pde.core.IBaseModel; 18 import org.eclipse.pde.internal.ui.PDEUIMessages; 19 20 public class RemoveStaticProjectReferences extends AbstractPDEMarkerResolution { 21 22 public RemoveStaticProjectReferences(int type) { 23 super(type); 24 } 25 26 public String getDescription() { 27 return PDEUIMessages.RemoveBuildOrderEntries_desc; 28 } 29 30 public String getLabel() { 31 return PDEUIMessages.RemoveBuildOrderEntries_label; 32 } 33 34 public void run(IMarker marker) { 35 try { 36 IProject project = marker.getResource().getProject(); 37 if (project == null) return; 38 IProjectDescription projDesc = project.getDescription(); 39 if (projDesc == null) return; 40 projDesc.setReferencedProjects(new IProject[0]); 41 project.setDescription(projDesc, null); 42 } catch (CoreException e) { 43 } 44 } 45 46 protected void createChange(IBaseModel model) { 47 } 49 } 50 | Popular Tags |