newntui/discovermdi/src/dockablebrowser.cpp
//-------------------------------------------------------------------------------------------------
// Callback runs every time the user clicked "Query" button in the Developer
// Studio. We are extracting symbol from the developer studio into Query list.
//-------------------------------------------------------------------------------------------------
Callback runs every time the user clicked "Query" button in the Developer
Studio. We are extracting symbol from the developer studio into Query list.
Callback runs every time the user clicked " Query " button in the Developer Studio . We are extracting symbol from the developer studio into Query list .
void CDockableBrowser::IntegratorQuery(LPCTSTR lfile, long line,long col, long size){
CCodeRoverIntegrator* integrator=(CCodeRoverIntegrator*) GetDlgItem(IDC_CODEROVERINTEGRATORCTRL);
CString serverQuery;
CString infoString;
CString ffile;
BSTR q;
	if(integrator==NULL) return;
	CDataSource* DataSource;
	DataSource = (CDataSource *)     GetDlgItem(IDC_DATASOURCE);
	unsigned register i;
	if(lfile!=NULL) {
		for(i=0;i<strlen(lfile);i++) {
		    if(lfile[i]=='\\') 
			    ffile+="/";
		    else
			    ffile+=lfile[i];
		}
	}
	serverQuery.Format("printformat \"%%s\" etag;set tmp [get_instance_symbol [set_copy -e %ld,%ld:[lname {%s}]]]",line,col,ffile);
	q=serverQuery.AllocSysString();
	CString test;
	test=DataSourceAccessSync(DataSource, &q);
    ::SysFreeString(q);
	BrowseGivenSet(CString("tmp"));
    serverQuery="unset tmp";
	q=serverQuery.AllocSysString();
	DataSourceAccessSync(DataSource, &q);
    ::SysFreeString(q);
    CMainFrame* main;
    main = (CMainFrame *)AfxGetMainWnd();
	main->SetForegroundWindow();
	main->ActivateFrame();
}
void CDockableBrowser :: IntegratorQuery ( LPCTSTR lfile , long line , long col , long size ) { CCodeRoverIntegrator * integrator = ( CCodeRoverIntegrator * ) GetDlgItem ( IDC_CODEROVERINTEGRATORCTRL ) ; CString serverQuery ; CString infoString ; CString ffile ; BSTR q ; if ( integrator == NULL ) return ; CDataSource * DataSource ; DataSource = ( CDataSource * ) GetDlgItem ( IDC_DATASOURCE ) ; unsigned register i ; if ( lfile != NULL ) { for ( i = 0 ; i < strlen ( lfile ) ; i ++ ) { if ( lfile [ i ] == ' \\ ' ) ffile += " " ; else ffile += lfile [ i ] ; } } serverQuery . Format ( " \" \" " , line , col , ffile ) ; q = serverQuery . AllocSysString ( ) ; CString test ; test = DataSourceAccessSync ( DataSource , & q ) ; :: SysFreeString ( q ) ; BrowseGivenSet ( CString ( " " ) ) ; serverQuery = " " ; q = serverQuery . AllocSysString ( ) ; DataSourceAccessSync ( DataSource , & q ) ; :: SysFreeString ( q ) ; CMainFrame * main ; main = ( CMainFrame * ) AfxGetMainWnd ( ) ; main -> SetForegroundWindow ( ) ; main -> ActivateFrame ( ) ; }
Callback runs every time the user clicked "Query" button in the Developer
Studio.
Callback runs every time the user clicked " Query " button in the Developer Studio .
// Asking Developer Studio for it's current tab size. //	int tabsize = integrator->GetTabSize(); // Getting symbol //	line = integrator->GetModelLine(ffile,ffile,line); //    serverQuery.Format("set tmp [msdev2sym \"%s\" %ld %ld %ld]",ffile, line, col, 1);