mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Removed temporary logs
This commit is contained in:
parent
eba69424ae
commit
bbebd52ad0
10 changed files with 0 additions and 206 deletions
|
@ -23,7 +23,6 @@ import org.eclipse.cdt.core.errorparsers.RegexErrorPattern;
|
|||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
||||
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsLogger;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
||||
|
@ -175,11 +174,6 @@ public abstract class AbstractBuildCommandParser extends AbstractLanguageSetting
|
|||
}
|
||||
|
||||
setSettingEntries(currentCfgDescription, rc, currentLanguageId, entries);
|
||||
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logInfo(getPrefixForLog()
|
||||
+ getClass().getSimpleName() + " collected " + (entries!=null ? ("" + entries.size()) : "null") + " entries for " + rc);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,7 +43,6 @@ import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
|||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.internal.core.BuildRunnerHelper;
|
||||
import org.eclipse.cdt.internal.core.XmlUtil;
|
||||
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsLogger;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedMakeMessages;
|
||||
import org.eclipse.cdt.utils.CommandLineUtil;
|
||||
|
@ -335,17 +334,12 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
|
|||
|
||||
@Override
|
||||
public void registerListener(ICConfigurationDescription cfgDescription) {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logInfo(getPrefixForLog() + "registerListener [" + System.identityHashCode(this) + "] " + this);
|
||||
|
||||
currentCfgDescription = cfgDescription;
|
||||
execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterListener() {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logInfo(getPrefixForLog() + "unregisterListener [" + System.identityHashCode(this) + "] " + this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -370,8 +364,6 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
|
|||
*/
|
||||
protected void execute() {
|
||||
if (isExecuted) {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
// LanguageSettingsLogger.logInfo(getPrefixForLog() + "Already executed [" + System.identityHashCode(this) + "] " + this);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -410,9 +402,6 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
|
|||
}
|
||||
job.setRule(rule);
|
||||
job.schedule();
|
||||
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logInfo(getPrefixForLog() + "Execution scheduled [" + System.identityHashCode(this) + "] " + this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -509,11 +498,6 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
|
|||
protected void shutdownForLanguage() {
|
||||
if (detectedSettingEntries != null && detectedSettingEntries.size() > 0) {
|
||||
collected = detectedSettingEntries.size();
|
||||
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logInfo(getPrefixForLog()
|
||||
+ getClass().getSimpleName() + " collected " + detectedSettingEntries.size() + " entries" + " for language " + currentLanguageId);
|
||||
|
||||
setSettingEntries(currentCfgDescription, currentResource, currentLanguageId, detectedSettingEntries);
|
||||
}
|
||||
detectedSettingEntries = null;
|
||||
|
|
|
@ -37,7 +37,6 @@ import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
|||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||
import org.eclipse.cdt.internal.core.XmlUtil;
|
||||
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsLogger;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||
import org.eclipse.cdt.utils.EFSExtensionManager;
|
||||
import org.eclipse.core.filesystem.EFS;
|
||||
|
@ -563,22 +562,6 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
|
|||
return buildDirURI;
|
||||
}
|
||||
|
||||
// AG FIXME - temporary, remove me
|
||||
/**
|
||||
* @since 8.2
|
||||
*/
|
||||
@Deprecated
|
||||
protected String getPrefixForLog() {
|
||||
String str;
|
||||
if (currentCfgDescription!= null) {
|
||||
IProject ownerProject = currentCfgDescription.getProjectDescription().getProject();
|
||||
str = ownerProject + ":" + currentCfgDescription.getName();
|
||||
} else {
|
||||
str = "[global]";
|
||||
}
|
||||
return str + ": ";
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets language settings entries for current configuration description, current resource
|
||||
* and current language ID.
|
||||
|
@ -587,10 +570,6 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
|
|||
*/
|
||||
protected void setSettingEntries(List<ICLanguageSettingEntry> entries) {
|
||||
setSettingEntries(currentCfgDescription, currentResource, currentLanguageId, entries);
|
||||
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logInfo(getPrefixForLog()
|
||||
+ getClass().getSimpleName() + " collected " + (entries!=null ? ("" + entries.size()) : "null") + " entries for " + currentResource);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -232,8 +232,6 @@ public class ScannerDiscoveryLegacySupport {
|
|||
legacyProfiles = new HashMap<String, String>();
|
||||
|
||||
// InputTypes
|
||||
// TODO -doublecheck
|
||||
// legacyProfiles.put(inputTypeId, scannerConfigDiscoveryProfileId);
|
||||
legacyProfiles.put("cdt.managedbuild.tool.gnu.c.compiler.input", "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC|org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile");
|
||||
legacyProfiles.put("cdt.managedbuild.tool.gnu.cpp.compiler.input", "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP|org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile");
|
||||
legacyProfiles.put("cdt.managedbuild.tool.gnu.c.compiler.input.cygwin", "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC");
|
||||
|
@ -243,8 +241,6 @@ public class ScannerDiscoveryLegacySupport {
|
|||
legacyProfiles.put("cdt.managedbuild.tool.xlc.cpp.compiler.input", "org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP");
|
||||
|
||||
// Toolchains
|
||||
// TODO -doublecheck
|
||||
// legacyProfiles.put(toolchainId, scannerConfigDiscoveryProfileId);
|
||||
}
|
||||
|
||||
return legacyProfiles.get(id);
|
||||
|
|
|
@ -64,7 +64,6 @@ import org.eclipse.cdt.internal.core.CharOperation;
|
|||
import org.eclipse.cdt.internal.core.cdtvariables.CoreVariableSubstitutor;
|
||||
import org.eclipse.cdt.internal.core.cdtvariables.DefaultVariableContextInfo;
|
||||
import org.eclipse.cdt.internal.core.cdtvariables.ICoreVariableContextInfo;
|
||||
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsLogger;
|
||||
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsProvidersSerializer;
|
||||
import org.eclipse.cdt.internal.core.model.APathEntry;
|
||||
import org.eclipse.cdt.internal.core.model.CModelStatus;
|
||||
|
@ -2017,9 +2016,6 @@ public class PathEntryTranslator {
|
|||
public boolean visit(PathSettingsContainer container) {
|
||||
CResourceData rcData = (CResourceData)container.getValue();
|
||||
if (rcData != null) {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
temporaryLog(cfgDescription, kinds, rcData);
|
||||
|
||||
PathEntryCollector child = collector.createChild(container.getPath());
|
||||
for (int kind : kinds) {
|
||||
List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
|
||||
|
@ -2031,24 +2027,6 @@ public class PathEntryTranslator {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
@Deprecated
|
||||
private void temporaryLog(final ICConfigurationDescription cfgDescription, final int[] kinds, CResourceData rcData) {
|
||||
String kindsStr="";
|
||||
for (int kind : kinds) {
|
||||
String kstr = LanguageSettingEntriesSerializer.kindToString(kind);
|
||||
if (kindsStr.length()==0) {
|
||||
kindsStr = kstr;
|
||||
} else {
|
||||
kindsStr += "|" + kstr;
|
||||
}
|
||||
}
|
||||
final IProject prj = cfgDescription.getProjectDescription().getProject();
|
||||
String log_msg = "path="+prj+"/"+rcData.getPath()+", kind=["+kindsStr+"]"+" (PathEntryTranslator.collectEntries())";
|
||||
LanguageSettingsLogger.logInfo(log_msg);
|
||||
}
|
||||
|
||||
});
|
||||
return collector;
|
||||
}
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
package org.eclipse.cdt.internal.core.language.settings.providers;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
|
||||
/**
|
||||
* AG FIXME -Temporary class for logging language settings providers development.
|
||||
* To remove before CDT Juno release
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public class LanguageSettingsLogger {
|
||||
private static boolean isEnabled() {
|
||||
return false;
|
||||
// return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param msg
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void logInfo(String msg) {
|
||||
if (isEnabled()) {
|
||||
Exception e = new Exception(msg);
|
||||
IStatus status = new Status(IStatus.INFO, CCorePlugin.PLUGIN_ID, msg, e);
|
||||
CCorePlugin.log(status);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param msg
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void logWarning(String msg) {
|
||||
if (isEnabled()) {
|
||||
Exception e = new Exception(msg);
|
||||
IStatus status = new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, msg, e);
|
||||
CCorePlugin.log(status);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param msg
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void logError(String msg) {
|
||||
if (isEnabled()) {
|
||||
Exception e = new Exception(msg);
|
||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, msg, e);
|
||||
CCorePlugin.log(status);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rc
|
||||
* @param who - pass "this" (calling class instance) here
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void logScannerInfoProvider(IResource rc, Object who) {
|
||||
if (isEnabled()) {
|
||||
String msg = "rc="+rc+" <-- "+who.getClass().getSimpleName(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
if (rc instanceof IFile) {
|
||||
LanguageSettingsLogger.logInfo(msg);
|
||||
} else if (rc instanceof IProject) {
|
||||
LanguageSettingsLogger.logWarning(msg);
|
||||
} else {
|
||||
LanguageSettingsLogger.logError(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -520,9 +520,6 @@ public class LanguageSettingsProvidersSerializer {
|
|||
* @throws CoreException
|
||||
*/
|
||||
public static void serializeLanguageSettingsWorkspace() throws CoreException {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logWarning("LanguageSettingsProvidersSerializer.serializeLanguageSettingsWorkspace()");
|
||||
|
||||
URI uriStoreWsp = getStoreInWorkspaceArea(STORAGE_WORKSPACE_LANGUAGE_SETTINGS);
|
||||
List<LanguageSettingsSerializableProvider> serializableWorkspaceProviders = new ArrayList<LanguageSettingsSerializableProvider>();
|
||||
for (ILanguageSettingsProvider provider : rawGlobalWorkspaceProviders.values()) {
|
||||
|
@ -829,9 +826,6 @@ public class LanguageSettingsProvidersSerializer {
|
|||
*/
|
||||
public static void serializeLanguageSettings(ICProjectDescription prjDescription) throws CoreException {
|
||||
IProject project = prjDescription.getProject();
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logWarning("LanguageSettingsProvidersSerializer.serializeLanguageSettings() for " + project);
|
||||
|
||||
try {
|
||||
// Add the storage module to .cpoject and persist on disk as a side effect of adding
|
||||
prjDescription.getStorage(CPROJECT_STORAGE_MODULE_LANGUAGE_SETTINGS_PROVIDERS, true);
|
||||
|
@ -1260,35 +1254,6 @@ public class LanguageSettingsProvidersSerializer {
|
|||
return provider instanceof LanguageSettingsWorkspaceProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports inconsistency in log.
|
||||
* AG FIXME - temporary method to remove before CDT Juno release
|
||||
*/
|
||||
@SuppressWarnings("nls")
|
||||
@Deprecated
|
||||
public static void assertConsistency(ICProjectDescription prjDescription) {
|
||||
if (prjDescription != null) {
|
||||
List<ILanguageSettingsProvider> prjProviders = new ArrayList<ILanguageSettingsProvider>();
|
||||
for (ICConfigurationDescription cfgDescription : prjDescription.getConfigurations()) {
|
||||
if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) {
|
||||
List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders();
|
||||
for (ILanguageSettingsProvider provider : providers) {
|
||||
if (!LanguageSettingsManager.isWorkspaceProvider(provider)) {
|
||||
if (isInList(prjProviders, provider)) {
|
||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "Inconsistent state, duplicate LSP in project description "
|
||||
+ "[" + System.identityHashCode(provider) + "] "
|
||||
+ provider);
|
||||
CoreException e = new CoreException(status);
|
||||
CCorePlugin.log(e);
|
||||
}
|
||||
prjProviders.add(provider);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that this particular element is in the list.
|
||||
*/
|
||||
|
@ -1380,13 +1345,9 @@ public class LanguageSettingsProvidersSerializer {
|
|||
*/
|
||||
public static void reRegisterListeners(ICProjectDescription oldPrjDescription, ICProjectDescription newPrjDescription) {
|
||||
if (oldPrjDescription == newPrjDescription) {
|
||||
assertConsistency(oldPrjDescription);
|
||||
return;
|
||||
}
|
||||
|
||||
assertConsistency(oldPrjDescription);
|
||||
assertConsistency(newPrjDescription);
|
||||
|
||||
List<ICListenerAgent> oldListeners = getListeners(oldPrjDescription);
|
||||
List<ListenerAssociation> newAssociations = getListenersAssociations(newPrjDescription);
|
||||
|
||||
|
@ -1453,9 +1414,6 @@ public class LanguageSettingsProvidersSerializer {
|
|||
* @param event - the {@link ILanguageSettingsChangeEvent} event to be broadcast.
|
||||
*/
|
||||
private static void notifyLanguageSettingsChangeListeners(ILanguageSettingsChangeEvent event) {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logWarning("Firing " + event);
|
||||
|
||||
for (Object listener : fLanguageSettingsChangeListeners.getListeners()) {
|
||||
((ILanguageSettingsChangeListener) listener).handleEvent(event);
|
||||
}
|
||||
|
|
|
@ -65,9 +65,6 @@ public class LanguageSettingsScannerInfoProvider implements IScannerInfoProvider
|
|||
|
||||
@Override
|
||||
public ExtendedScannerInfo getScannerInformation(IResource rc) {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logScannerInfoProvider(rc, this);
|
||||
|
||||
IProject project = rc.getProject();
|
||||
if (project==null)
|
||||
return DUMMY_SCANNER_INFO;
|
||||
|
|
|
@ -36,7 +36,6 @@ import org.eclipse.cdt.core.settings.model.ICProjectDescriptionListener;
|
|||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingBase;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
||||
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsLogger;
|
||||
import org.eclipse.cdt.utils.EFSExtensionManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
@ -79,9 +78,6 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP
|
|||
|
||||
@Override
|
||||
public IScannerInfo getScannerInformation(IResource resource) {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
LanguageSettingsLogger.logScannerInfoProvider(resource, this);
|
||||
|
||||
if(!fInited)
|
||||
updateProjCfgInfo(CProjectDescriptionManager.getInstance().getProjectDescription(fProject, false));
|
||||
|
||||
|
|
|
@ -29,10 +29,8 @@ import org.eclipse.cdt.core.model.IMacroFileEntry;
|
|||
import org.eclipse.cdt.core.parser.IScannerInfo;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
|
||||
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsLogger;
|
||||
import org.eclipse.cdt.internal.core.model.PathEntryManager;
|
||||
import org.eclipse.cdt.internal.core.settings.model.ScannerInfoProviderProxy;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
|
@ -98,13 +96,6 @@ public class ScannerProvider extends AbstractCExtension implements IScannerInfoP
|
|||
*/
|
||||
@Override
|
||||
public IScannerInfo getScannerInformation(IResource resource) {
|
||||
// AG FIXME - temporary log to remove before CDT Juno release
|
||||
if (resource instanceof IFile) {
|
||||
LanguageSettingsLogger.logInfo("rc="+resource+" (ScannerProvider.getScannerInformation())");
|
||||
} else {
|
||||
LanguageSettingsLogger.logWarning("rc="+resource+" (ScannerProvider.getScannerInformation())");
|
||||
}
|
||||
|
||||
IPath resPath = resource.getFullPath();
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue