1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 23:35:48 +02:00

added cache param

This commit is contained in:
David Inglis 2003-08-14 13:52:00 +00:00
parent 16a1cd62be
commit 744e9ba7ba
2 changed files with 4 additions and 3 deletions

View file

@ -25,6 +25,7 @@ import org.eclipse.core.runtime.Plugin;
* The main plugin class to be used in the desktop. * The main plugin class to be used in the desktop.
*/ */
public class MakeCorePlugin extends Plugin { public class MakeCorePlugin extends Plugin {
public static final String OLD_BUILDER_ID = "org.eclipse.cdt.core.cbuilder";
//The shared instance. //The shared instance.
private static MakeCorePlugin plugin; private static MakeCorePlugin plugin;
//Resource bundle. //Resource bundle.

View file

@ -59,7 +59,7 @@ public class MakeScannerProvider extends AbstractCExtension implements IScannerI
return defaultProvider; return defaultProvider;
} }
public MakeScannerInfo getMakeScannerInfo(IProject project) throws CoreException { public MakeScannerInfo getMakeScannerInfo(IProject project, boolean cacheInfo) throws CoreException {
MakeScannerInfo scannerInfo = null; MakeScannerInfo scannerInfo = null;
// See if there's already one associated with the resource for this session // See if there's already one associated with the resource for this session
scannerInfo = (MakeScannerInfo)project.getSessionProperty(scannerInfoProperty); scannerInfo = (MakeScannerInfo)project.getSessionProperty(scannerInfoProperty);
@ -71,7 +71,7 @@ public class MakeScannerProvider extends AbstractCExtension implements IScannerI
// There is nothing persisted for the session, or saved in a file so // There is nothing persisted for the session, or saved in a file so
// create a build info object // create a build info object
if (scannerInfo != null) { if (scannerInfo != null && cacheInfo == true) {
((IProject)project).setSessionProperty(scannerInfoProperty, scannerInfo); ((IProject)project).setSessionProperty(scannerInfoProperty, scannerInfo);
} }
return scannerInfo; return scannerInfo;
@ -110,7 +110,7 @@ public class MakeScannerProvider extends AbstractCExtension implements IScannerI
public IScannerInfo getScannerInformation(IResource resource) { public IScannerInfo getScannerInformation(IResource resource) {
IScannerInfo info = null; IScannerInfo info = null;
try { try {
info = getMakeScannerInfo((IProject)resource); info = getMakeScannerInfo((IProject)resource, true);
} catch (CoreException e) { } catch (CoreException e) {
} }
return info; return info;