if(!(psiFile instanceof YAMLFile) && !(psiFile instanceof XmlFile) && !(psiFile instanceof PhpFile)) {
return;
}
SymfonyCreateService symfonyCreateService = new SymfonyCreateService(event.getProject(), (PsiFile) psiFile);
if(psiFile instanceof PhpFile) {
if("ProjectViewPopup".equals(event.getPlace())) {
PhpClass phpClass = PhpElementsUtil.getFirstClassFromFile((PhpFile) psiFile);
if(phpClass != null) {
symfonyCreateService.setClassName(phpClass.getPresentableFQN());
}
} else {
Object psiElement = event.getData(DataKey.create("psi.Element"));
if(psiElement instanceof PhpClass) {
symfonyCreateService.setClassName(((PhpClass) psiElement).getPresentableFQN());
}
}
}
symfonyCreateService.init();
Dimension dim = new Dimension();
symfonyCreateService.setTitle("Create Service");
symfonyCreateService.pack();
symfonyCreateService.setLocationRelativeTo(null);
symfonyCreateService.setVisible(true);
}