1 19 20 package org.netbeans.modules.j2ee.refactoring.safedelete; 21 22 import org.netbeans.jmi.javamodel.JavaClass; 23 import org.netbeans.modules.j2ee.refactoring.J2EERefactoring; 24 import org.netbeans.modules.j2ee.refactoring.jaxwssupport.JaxWsXmlRefactoringSupport; 25 import org.netbeans.modules.refactoring.api.Problem; 26 import org.netbeans.modules.refactoring.spi.RefactoringElementsBag; 27 import org.netbeans.modules.websvc.api.jaxws.project.config.Endpoint; 28 import org.netbeans.modules.websvc.api.jaxws.project.config.JaxWsModel; 29 import org.openide.filesystems.FileObject; 30 import org.openide.util.NbBundle; 31 32 40 public class SunJaxWsXmlSafeDeleteRefactoring extends JaxWsXmlRefactoringSupport implements J2EERefactoring { 41 42 45 private JavaClass javaClass; 46 47 50 public SunJaxWsXmlSafeDeleteRefactoring(JavaClass javaClass) { 51 this.javaClass = javaClass; 52 } 53 54 58 public Problem preCheck() { 59 60 if (!isWebSvcFromWsdl(javaClass)){ 61 return null; 62 } 63 64 FileObject sunjaxwsfile = getSunJaxWsXmlFile(javaClass); 65 Problem result = null; 66 67 for (Endpoint each : getEndpoints(javaClass)) { 68 Problem problem = new Problem(false, NbBundle.getMessage(SunJaxWsXmlSafeDeleteRefactoring.class, 69 "TXT_SunJaxWsXmlSafeDeleteWarning", javaClass.getName(), sunjaxwsfile.getNameExt())); if (result != null){ 71 result.setNext(problem); 72 } else { 73 result = problem; 74 } 75 } 76 return result; 77 } 78 79 public Problem checkParameters() { 80 return null; 81 } 82 83 public Problem fastCheckParameters() { 84 return null; 85 } 86 87 public Problem prepare(RefactoringElementsBag refactoringElementsBag) { 88 return null; 89 } 90 } 91 | Popular Tags |