use of org.kie.workbench.common.services.refactoring.service.impact.DeleteOperationRequest in project kie-wb-common by kiegroup.
the class QueryOperationRequestTest method exampleCode.
@Test
@SuppressWarnings("unused")
public void exampleCode() {
String className = this.getClass().getName();
String projectName = "org.my.package:my-project:1.0";
String projectRootPathURI = "default://repo/my-project";
String newClassName = Random.class.getName();
DeleteOperationRequest delReq = DeleteOperationRequest.deleteReferences(className, ResourceType.JAVA).inModule(projectName).onAllBranches();
delReq = DeleteOperationRequest.deleteReferences(className, ResourceType.JAVA).inModuleRootPathURI(projectRootPathURI).onAllBranches();
delReq = DeleteOperationRequest.deletePartReferences(className, "setAge(long)", PartType.METHOD).inModule(projectName).onAllBranches();
delReq = DeleteOperationRequest.deletePartReferences(className, "setAge(long)", PartType.METHOD).inModuleRootPathURI(projectRootPathURI).onAllBranches();
RefactorOperationRequest refOp = RefactorOperationRequest.refactorReferences(className, ResourceType.JAVA, newClassName).inModule(projectName).onBranch("branch-name");
refOp = RefactorOperationRequest.refactorReferences(className, ResourceType.JAVA, newClassName).inModuleRootPathURI(projectRootPathURI).onBranch("branch-name");
refOp = RefactorOperationRequest.refactorPartReferences(className, "toName(int)", PartType.METHOD, "toSurName(int)").inModule(projectName).onAllBranches();
refOp = RefactorOperationRequest.refactorPartReferences(className, "toName(int)", PartType.METHOD, "toSurName(int)").inModuleRootPathURI(projectRootPathURI).onAllBranches();
refOp = RefactorOperationRequest.refactorPartReferences(className, "toName(int)", PartType.METHOD, "toSurName(int)").inModule(projectName).onBranch("branch-name");
QueryOperationRequest queOp = QueryOperationRequest.references(className, ResourceType.JAVA).inModule(projectName).onBranch("branch-name");
queOp = QueryOperationRequest.references(className, ResourceType.JAVA).inModuleRootPathURI(projectRootPathURI).onBranch("branch-name");
}
Aggregations