mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 179202. Make showing the list of source files when you expand a binary optional. This setting will go away once we do 182388.
This commit is contained in:
parent
716c2e20a6
commit
e451a6c00a
4 changed files with 26 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2006 QNX Software Systems and others.
|
* Copyright (c) 2000, 2007 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -18,6 +18,8 @@ import java.io.InputStreamReader;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
||||||
import org.eclipse.cdt.core.ISymbolReader;
|
import org.eclipse.cdt.core.ISymbolReader;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
|
||||||
|
@ -248,7 +250,9 @@ public class Binary extends Openable implements IBinary {
|
||||||
// First check if we can get the list of source
|
// First check if we can get the list of source
|
||||||
// files used to build the binary from the symbol
|
// files used to build the binary from the symbol
|
||||||
// information. if not, fall back on information from the binary parser.
|
// information. if not, fall back on information from the binary parser.
|
||||||
if (!addSourceFiles(info, obj, hash))
|
boolean showSourceFiles = CCorePlugin.getDefault().getPluginPreferences().getBoolean( CCorePreferenceConstants.SHOW_SOURCE_FILES_IN_BINARIES );
|
||||||
|
if (!showSourceFiles ||
|
||||||
|
!addSourceFiles(info, obj, hash))
|
||||||
{
|
{
|
||||||
ISymbol[] symbols = obj.getSymbols();
|
ISymbol[] symbols = obj.getSymbols();
|
||||||
for (int i = 0; i < symbols.length; i++) {
|
for (int i = 0; i < symbols.length; i++) {
|
||||||
|
|
|
@ -75,4 +75,9 @@ public class CCorePreferenceConstants {
|
||||||
* Default workspace-wide language mappings.
|
* Default workspace-wide language mappings.
|
||||||
*/
|
*/
|
||||||
public static final String DEFAULT_WORKSPACE_LANGUAGE_MAPPINGS = ""; //$NON-NLS-1$
|
public static final String DEFAULT_WORKSPACE_LANGUAGE_MAPPINGS = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempt to show source files for executable binaries.
|
||||||
|
*/
|
||||||
|
public static final String SHOW_SOURCE_FILES_IN_BINARIES = CCorePlugin.PLUGIN_ID + ".showSourceFilesInBinaries"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,8 @@ public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
optionNames.add(optionName);
|
optionNames.add(optionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaultPreferences.putBoolean(CCorePreferenceConstants.SHOW_SOURCE_FILES_IN_BINARIES, true);
|
||||||
|
|
||||||
// indexer defaults
|
// indexer defaults
|
||||||
IndexerPreferences.initializeDefaultPreferences(defaultPreferences);
|
IndexerPreferences.initializeDefaultPreferences(defaultPreferences);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2005 QNX Software Systems and others.
|
* Copyright (c) 2004, 2007 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -11,6 +11,9 @@
|
||||||
package org.eclipse.cdt.debug.internal.ui.preferences;
|
package org.eclipse.cdt.debug.internal.ui.preferences;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
||||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||||
import org.eclipse.cdt.debug.core.ICDebugConstants;
|
import org.eclipse.cdt.debug.core.ICDebugConstants;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIFormat;
|
import org.eclipse.cdt.debug.core.cdi.ICDIFormat;
|
||||||
|
@ -77,6 +80,8 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
|
|
||||||
private PropertyChangeListener fPropertyChangeListener;
|
private PropertyChangeListener fPropertyChangeListener;
|
||||||
|
|
||||||
|
private Button fShowBinarySourceFilesButton;
|
||||||
|
|
||||||
protected class PropertyChangeListener implements IPropertyChangeListener {
|
protected class PropertyChangeListener implements IPropertyChangeListener {
|
||||||
|
|
||||||
private boolean fHasStateChanged = false;
|
private boolean fHasStateChanged = false;
|
||||||
|
@ -127,6 +132,8 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
createViewSettingPreferences( composite );
|
createViewSettingPreferences( composite );
|
||||||
createSpacer( composite, 1 );
|
createSpacer( composite, 1 );
|
||||||
createDisassemblySettingPreferences( composite );
|
createDisassemblySettingPreferences( composite );
|
||||||
|
createSpacer( composite, 1 );
|
||||||
|
createBinarySettings( composite );
|
||||||
setValues();
|
setValues();
|
||||||
return composite;
|
return composite;
|
||||||
}
|
}
|
||||||
|
@ -157,6 +164,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
|
fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
|
||||||
fExpressionFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ) ) );
|
fExpressionFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ) ) );
|
||||||
fRegisterFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT ) ) );
|
fRegisterFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT ) ) );
|
||||||
|
fShowBinarySourceFilesButton.setSelection( CCorePlugin.getDefault().getPluginPreferences().getBoolean( CCorePreferenceConstants.SHOW_SOURCE_FILES_IN_BINARIES ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -205,6 +213,9 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
fRegisterFormatCombo = createComboBox( formatComposite, PreferenceMessages.getString( "CDebugPreferencePage.10" ), fFormatLabels, fFormatLabels[0] ); //$NON-NLS-1$
|
fRegisterFormatCombo = createComboBox( formatComposite, PreferenceMessages.getString( "CDebugPreferencePage.10" ), fFormatLabels, fFormatLabels[0] ); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createBinarySettings( Composite parent ) {
|
||||||
|
fShowBinarySourceFilesButton = createCheckButton( parent, "Show source files in binaries" );
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Create the disassembly setting preferences composite widget
|
* Create the disassembly setting preferences composite widget
|
||||||
*/
|
*/
|
||||||
|
@ -334,6 +345,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT, getFormatId( fExpressionFormatCombo.getSelectionIndex() ) );
|
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT, getFormatId( fExpressionFormatCombo.getSelectionIndex() ) );
|
||||||
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT, getFormatId( fRegisterFormatCombo.getSelectionIndex() ) );
|
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT, getFormatId( fRegisterFormatCombo.getSelectionIndex() ) );
|
||||||
getDisassemblySourceColor().store();
|
getDisassemblySourceColor().store();
|
||||||
|
CCorePlugin.getDefault().getPluginPreferences().setValue( CCorePreferenceConstants.SHOW_SOURCE_FILES_IN_BINARIES, fShowBinarySourceFilesButton.getSelection() );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue