예제 #1
0
 @Override
 public CElementInfo getElementInfo(IProgressMonitor monitor) throws CModelException {
   CModelManager manager = CModelManager.getDefault();
   synchronized (manager) {
     CElementInfo info = (CElementInfo) manager.getInfo(this);
     if (info != null) {
       return info;
     }
     info = createElementInfo();
     openWhenClosed(info, monitor);
     return info;
   }
 }
예제 #2
0
 /* (non-Javadoc)
  * @see org.eclipse.cdt.internal.core.model.CElement#closing(java.lang.Object)
  */
 @Override
 protected void closing(Object info) throws CModelException {
   ICProject cproject = getCProject();
   CProjectInfo pinfo = (CProjectInfo) CModelManager.getDefault().peekAtInfo(cproject);
   if (pinfo != null && pinfo.vLib != null) {
     pinfo.vLib.removeChild(this);
   }
   super.closing(info);
 }
예제 #3
0
 /* (non-Javadoc)
  * @see org.eclipse.cdt.internal.core.model.Openable#buildStructure(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
  */
 @Override
 protected boolean buildStructure(
     OpenableInfo info,
     IProgressMonitor pm,
     Map<ICElement, CElementInfo> newElements,
     IResource underlyingResource)
     throws CModelException {
   // this will bootstrap/start the runner for the project.
   CModelManager.getDefault().getBinaryRunner(getCProject());
   return true;
 }