pc.removeLastPageSource(true);
}
}
public static ComponentImpl loadComponent(PageContext pc,Page page, PageSource ps,String callPath, boolean isRealPath) throws PageException {
ComponentImpl rtn=null;
if(pc.getConfig().debug()) {
DebugEntryTemplate debugEntry=pc.getDebugger().getEntry(pc,ps);
pc.addPageSource(ps,true);
int currTime=pc.getExecutionTime();
long exeTime=0;
long time=System.nanoTime();
try {
debugEntry.updateFileLoadTime((int)(System.nanoTime()-time));
exeTime=System.nanoTime();
if(page==null)page=((PageSourceImpl)ps).loadPage(pc);
rtn=initComponent(pc,page,callPath,isRealPath);
}
finally {
if(rtn!=null)rtn.setLoaded(true);
int diff= ((int)(System.nanoTime()-exeTime)-(pc.getExecutionTime()-currTime));
pc.setExecutionTime(pc.getExecutionTime()+(int)(System.nanoTime()-time));
debugEntry.updateExeTime(diff);
pc.removeLastPageSource(true);
}
}
// no debug
else {
pc.addPageSource(ps,true);
try {
if(page==null)page=((PageSourceImpl)ps).loadPage(pc);
rtn=initComponent(pc,page,callPath,isRealPath);
}
finally {
if(rtn!=null)rtn.setLoaded(true);
pc.removeLastPageSource(true);
}
}
return rtn;