void PhpPlugin::OnNewProject(clNewProjectEvent& e) { if(!PHPWorkspace::Get()->IsOpen()) { e.Skip(); #if 0 // No workspace is opened yet, let codelite process this event normally e.Skip(); clNewProjectEvent::Template phpTemplate; phpTemplate.m_category = "PHP"; phpTemplate.m_categoryPng = "m_bmpElephant"; phpTemplate.m_template = "PHP Project"; phpTemplate.m_templatePng = "m_bmpPhpFile"; phpTemplate.m_debugger = "XDebug"; phpTemplate.m_toolchain = "PHP Tools"; phpTemplate.m_allowSeparateFolder = true; e.GetTemplates().push_back(phpTemplate); #endif } else { // we have a PHP workspace opened - handle it ourself NewPHPProjectWizard wiz(EventNotifier::Get()->TopFrame()); if(wiz.RunWizard(wiz.GetFirstPage())) { m_workspaceView->CallAfter(&PHPWorkspaceView::CreateNewProject, wiz.GetCreateData()); } } }
void PhpPlugin::OnNewProject(clNewProjectEvent& e) { e.Skip(); clNewProjectEvent::Template phpTemplate; phpTemplate.m_category = "PHP"; phpTemplate.m_categoryPng = "m_bmpElephant"; phpTemplate.m_template = "PHP Project"; phpTemplate.m_templatePng = "m_bmpPhpFile"; phpTemplate.m_debugger = "XDebug"; phpTemplate.m_toolchain = "PHP Tools"; phpTemplate.m_allowSeparateFolder = true; e.GetTemplates().push_back(phpTemplate); }