本文整理汇总了C++中PHPConfigurationData::Save方法的典型用法代码示例。如果您正苦于以下问题:C++ PHPConfigurationData::Save方法的具体用法?C++ PHPConfigurationData::Save怎么用?C++ PHPConfigurationData::Save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPConfigurationData
的用法示例。
在下文中一共展示了PHPConfigurationData::Save方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnFinished
void PHPXDebugSetupWizard::OnFinished(wxWizardEvent& event)
{
PHPConfigurationData conf;
conf.Load();
long portNum(9000);
m_textCtrlPort->GetValue().ToCLong(&portNum);
conf.SetXdebugIdeKey(m_textCtrlKey->GetValue()).SetXdebugPort(portNum).SetXdebugHost(m_textCtrlIP->GetValue());
conf.Save();
}
示例2: FinalizeStartup
void PhpPlugin::FinalizeStartup()
{
// Create the debugger windows (hidden)
wxWindow* parent = m_mgr->GetDockingManager()->GetManagedWindow();
m_debuggerPane = new PHPDebugPane(parent);
m_mgr->GetDockingManager()->AddPane(m_debuggerPane,
wxAuiPaneInfo()
.Name("XDebug")
.Caption("Call Stack & Breakpoints")
.Hide()
.CloseButton()
.MaximizeButton()
.Bottom()
.Position(3));
m_xdebugLocalsView = new LocalsView(parent);
m_mgr->GetDockingManager()->AddPane(
m_xdebugLocalsView,
wxAuiPaneInfo().Name("XDebugLocals").Caption("Locals").Hide().CloseButton().MaximizeButton().Bottom());
m_xdebugEvalPane = new EvalPane(parent);
m_mgr->GetDockingManager()->AddPane(
m_xdebugEvalPane,
wxAuiPaneInfo().Name("XDebugEval").Caption("PHP").Hide().CloseButton().MaximizeButton().Bottom().Position(2));
// Check to see if the have a PHP executable setup
// if not - update it
PHPConfigurationData data;
data.Load();
PHPLocator locator;
if(locator.Locate()) {
// update a PHP executable in the settings
if(data.GetPhpExe().IsEmpty()) {
data.SetPhpExe(locator.GetPhpExe().GetFullPath());
}
data.Save();
}
}
示例3: phpResources
PhpPlugin::PhpPlugin(IManager* manager)
: IPlugin(manager)
, m_clangOldFlag(false)
, m_browser(NULL)
, m_debuggerPane(NULL)
, m_xdebugLocalsView(NULL)
, m_xdebugEvalPane(NULL)
, m_showWelcomePage(false)
{
m_longName = wxT("PHP Plugin for the codelite IDE");
m_shortName = wxT("PHP");
// Instantiate the bitmaps, we do this so they will be populated in wxXmlResource
// Sigleton class
PHPImages images;
PHPWorkspace::Get()->SetPluginManager(m_mgr);
XDebugManager::Initialize(this);
// Add our UI
// create tab (possibly detached)
Notebook* book = m_mgr->GetWorkspacePaneNotebook();
if(IsWorkspaceViewDetached()) {
// Make the window child of the main panel (which is the grand parent of the notebook)
DockablePane* cp = new DockablePane(
book->GetParent()->GetParent(), book, PHPStrings::PHP_WORKSPACE_VIEW_TITLE, wxNullBitmap, wxSize(200, 200));
m_workspaceView = new PHPWorkspaceView(cp, m_mgr);
cp->SetChildNoReparent(m_workspaceView);
} else {
m_workspaceView = new PHPWorkspaceView(book, m_mgr);
book->InsertPage(0, m_workspaceView, PHPStrings::PHP_WORKSPACE_VIEW_TITLE, true);
}
PHPCodeCompletion::Instance()->SetManager(m_mgr);
PHPEditorContextMenu::Instance()->ConnectEvents();
PHPParserThread::Instance()->Start();
// Pass the manager class to the context menu manager
PHPEditorContextMenu::Instance()->SetManager(m_mgr);
// Connect events
EventNotifier::Get()->Connect(
wxEVT_CC_SHOW_QUICK_OUTLINE, clCodeCompletionEventHandler(PhpPlugin::OnShowQuickOutline), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_DBG_UI_DELTE_ALL_BREAKPOINTS, clDebugEventHandler(PhpPlugin::OnXDebugDeleteAllBreakpoints), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_CREATE_NEW_WORKSPACE, wxCommandEventHandler(PhpPlugin::OnNewWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_NEW_PROJECT_WIZARD_SHOWING, clNewProjectEventHandler(PhpPlugin::OnNewProject), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_NEW_PROJECT_WIZARD_FINISHED, clNewProjectEventHandler(PhpPlugin::OnNewProjectFinish), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_IS_WORKSPACE_OPEN, clCommandEventHandler(PhpPlugin::OnIsWorkspaceOpen), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_CLOSE_WORKSPACE, clCommandEventHandler(PhpPlugin::OnCloseWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_OPEN_WORKSPACE, clCommandEventHandler(PhpPlugin::OnOpenWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_RELOAD_WORKSPACE, clCommandEventHandler(PhpPlugin::OnReloadWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_OPEN_RESOURCE, wxCommandEventHandler(PhpPlugin::OnOpenResource), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_GET_WORKSPACE_FILES, wxCommandEventHandler(PhpPlugin::OnGetWorkspaceFiles), NULL, this);
EventNotifier::Get()->Connect(wxEVT_CMD_GET_CURRENT_FILE_PROJECT_FILES,
wxCommandEventHandler(PhpPlugin::OnGetCurrentFileProjectFiles),
NULL,
this);
EventNotifier::Get()->Connect(
wxEVT_CMD_GET_ACTIVE_PROJECT_FILES, wxCommandEventHandler(PhpPlugin::OnGetActiveProjectFiles), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_GET_FIND_IN_FILES_MASK, clCommandEventHandler(PhpPlugin::OnGetFiFMask), NULL, this);
EventNotifier::Get()->Connect(wxEVT_FILE_SAVED, clCommandEventHandler(PhpPlugin::OnFileSaved), NULL, this);
EventNotifier::Get()->Connect(wxEVT_PHP_LOAD_URL, PHPEventHandler(PhpPlugin::OnLoadURL), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_ALL_EDITORS_CLOSED, wxCommandEventHandler(PhpPlugin::OnAllEditorsClosed), NULL, this);
EventNotifier::Get()->Bind(wxEVT_XDEBUG_CONNECTED, &PhpPlugin::OnDebugSatrted, this);
EventNotifier::Get()->Bind(wxEVT_XDEBUG_SESSION_ENDED, &PhpPlugin::OnDebugEnded, this);
EventNotifier::Get()->Connect(wxEVT_GOING_DOWN, clCommandEventHandler(PhpPlugin::OnGoingDown), NULL, this);
CallAfter(&PhpPlugin::DoCreateDebuggerPanes);
// Extract all CC files from PHP.zip into the folder ~/.codelite/php-plugin/cc
wxFileName phpResources(clStandardPaths::Get().GetDataDir(), "PHP.zip");
if(phpResources.Exists()) {
clZipReader zipReader(phpResources);
wxFileName targetDir(clStandardPaths::Get().GetUserDataDir(), "");
targetDir.AppendDir("php-plugin");
// Don't extract the zip if one of the files on disk is newer or equal to the zip timestamp
wxFileName fnSampleFile(targetDir.GetPath(), "basic.php");
fnSampleFile.AppendDir("cc");
if(!fnSampleFile.Exists() || // the sample file does not exists
// Or the resource file (PHP.zip) is newer than the sample file
(phpResources.GetModificationTime().GetTicks() > fnSampleFile.GetModificationTime().GetTicks())) {
targetDir.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
zipReader.Extract("*", targetDir.GetPath());
//.........这里部分代码省略.........
示例4: phpResources
PhpPlugin::PhpPlugin(IManager* manager)
: IPlugin(manager)
, m_clangOldFlag(false)
, m_browser(NULL)
, m_debuggerPane(NULL)
, m_xdebugLocalsView(NULL)
, m_xdebugEvalPane(NULL)
, m_showWelcomePage(false)
, m_toggleToolbar(false)
{
m_lint.Reset(new PHPLint(this));
// Add new workspace type
clWorkspaceManager::Get().RegisterWorkspace(new PHPWorkspace());
m_longName = _("PHP Plugin for the codelite IDE");
m_shortName = wxT("PHP");
// Instantiate the bitmaps, we do this so they will be populated in wxXmlResource
// Sigleton class
PHPWorkspace::Get()->SetPluginManager(m_mgr);
XDebugManager::Initialize(this);
// BitmapLoader::RegisterImage(FileExtManager::TypeWorkspacePHP, images.Bitmap("m_bmpPhpWorkspace"));
// Add our UI
// create tab (possibly detached)
m_workspaceView = new PHPWorkspaceView(m_mgr->GetWorkspaceView()->GetBook(), m_mgr);
m_mgr->GetWorkspaceView()->AddPage(m_workspaceView, PHPStrings::PHP_WORKSPACE_VIEW_LABEL);
PHPCodeCompletion::Instance()->SetManager(m_mgr);
PHPEditorContextMenu::Instance()->ConnectEvents();
PHPParserThread::Instance()->Start();
// Pass the manager class to the context menu manager
PHPEditorContextMenu::Instance()->SetManager(m_mgr);
// Connect events
EventNotifier::Get()->Connect(
wxEVT_CC_SHOW_QUICK_OUTLINE, clCodeCompletionEventHandler(PhpPlugin::OnShowQuickOutline), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_DBG_UI_DELTE_ALL_BREAKPOINTS, clDebugEventHandler(PhpPlugin::OnXDebugDeleteAllBreakpoints), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_CREATE_NEW_WORKSPACE, clCommandEventHandler(PhpPlugin::OnNewWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_NEW_PROJECT_WIZARD_SHOWING, clNewProjectEventHandler(PhpPlugin::OnNewProject), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_NEW_PROJECT_WIZARD_FINISHED, clNewProjectEventHandler(PhpPlugin::OnNewProjectFinish), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_IS_WORKSPACE_OPEN, clCommandEventHandler(PhpPlugin::OnIsWorkspaceOpen), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_CLOSE_WORKSPACE, clCommandEventHandler(PhpPlugin::OnCloseWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_OPEN_WORKSPACE, clCommandEventHandler(PhpPlugin::OnOpenWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_RELOAD_WORKSPACE, clCommandEventHandler(PhpPlugin::OnReloadWorkspace), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_OPEN_RESOURCE, wxCommandEventHandler(PhpPlugin::OnOpenResource), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_GET_WORKSPACE_FILES, wxCommandEventHandler(PhpPlugin::OnGetWorkspaceFiles), NULL, this);
EventNotifier::Get()->Connect(wxEVT_CMD_GET_CURRENT_FILE_PROJECT_FILES,
wxCommandEventHandler(PhpPlugin::OnGetCurrentFileProjectFiles),
NULL,
this);
EventNotifier::Get()->Connect(
wxEVT_CMD_GET_ACTIVE_PROJECT_FILES, wxCommandEventHandler(PhpPlugin::OnGetActiveProjectFiles), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_FIND_IN_FILES_DISMISSED, clCommandEventHandler(PhpPlugin::OnFindInFilesDismissed), NULL, this);
EventNotifier::Get()->Connect(wxEVT_FILE_SAVED, clCommandEventHandler(PhpPlugin::OnFileSaved), NULL, this);
EventNotifier::Get()->Bind(wxEVT_FILES_MODIFIED_REPLACE_IN_FILES, &PhpPlugin::OnReplaceInFiles, this);
EventNotifier::Get()->Connect(wxEVT_PHP_LOAD_URL, PHPEventHandler(PhpPlugin::OnLoadURL), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_ALL_EDITORS_CLOSED, wxCommandEventHandler(PhpPlugin::OnAllEditorsClosed), NULL, this);
EventNotifier::Get()->Bind(wxEVT_XDEBUG_SESSION_STARTED, &PhpPlugin::OnDebugStarted, this);
EventNotifier::Get()->Bind(wxEVT_XDEBUG_SESSION_ENDED, &PhpPlugin::OnDebugEnded, this);
EventNotifier::Get()->Connect(wxEVT_GOING_DOWN, clCommandEventHandler(PhpPlugin::OnGoingDown), NULL, this);
EventNotifier::Get()->Bind(wxEVT_FILE_SYSTEM_UPDATED, &PhpPlugin::OnFileSysetmUpdated, this);
EventNotifier::Get()->Bind(wxEVT_SAVE_SESSION_NEEDED, &PhpPlugin::OnSaveSession, this);
CallAfter(&PhpPlugin::FinalizeStartup);
// Extract all CC files from PHP.zip into the folder ~/.codelite/php-plugin/cc
wxFileName phpResources(clStandardPaths::Get().GetDataDir(), "PHP.zip");
if(phpResources.Exists()) {
clZipReader zipReader(phpResources);
wxFileName targetDir(clStandardPaths::Get().GetUserDataDir(), "");
targetDir.AppendDir("php-plugin");
// Don't extract the zip if one of the files on disk is newer or equal to the zip timestamp
wxFileName fnSampleFile(targetDir.GetPath(), "basic.php");
fnSampleFile.AppendDir("cc");
PHPConfigurationData config;
if(!fnSampleFile.Exists() || // the sample file does not exists
// Or the resource file (PHP.zip) is newer than the sample file
(phpResources.GetModificationTime().GetTicks() > fnSampleFile.GetModificationTime().GetTicks())) {
targetDir.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
//.........这里部分代码省略.........