Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 255026 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/dsf/gdb/IGdbDebugPreferenceConstants.java (-40 / +46 lines)
Lines 1-40 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 Ericsson and others.
2
 * Copyright (c) 2009 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 * 
8
 * Contributors:
8
 * Contributors:
9
 *     Ericsson - initial implementation
9
 *     Ericsson - initial implementation
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.cdt.dsf.gdb;
11
package org.eclipse.cdt.dsf.gdb;
12
12
13
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
13
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
14
14
15
15
16
16
17
/**
17
/**
18
 * @noimplement This interface is not intended to be implemented by clients.
18
 * @noimplement This interface is not intended to be implemented by clients.
19
 * @since 2.0
19
 * @since 2.0
20
 */
20
 */
21
public interface IGdbDebugPreferenceConstants {
21
public interface IGdbDebugPreferenceConstants {
22
	
22
	
23
	/**
23
	/**
24
	 * Boolean preference whether to enable GDB traces. Default is <code>true</code>. 
24
	 * Boolean preference whether to enable GDB traces. Default is <code>true</code>. 
25
	 */
25
	 */
26
	public static final String PREF_TRACES_ENABLE = "tracesEnable"; //$NON-NLS-1$
26
	public static final String PREF_TRACES_ENABLE = "tracesEnable"; //$NON-NLS-1$
27
27
28
	/**
28
	/**
29
	 * Boolean preference whether to automatically terminate GDB when the inferior exists. Default is <code>true</code>. 
29
	 * Boolean preference whether to automatically terminate GDB when the inferior exists. Default is <code>true</code>. 
30
	 */
30
	 */
31
	public static final String PREF_AUTO_TERMINATE_GDB = "autoTerminateGdb"; //$NON-NLS-1$
31
	public static final String PREF_AUTO_TERMINATE_GDB = "autoTerminateGdb"; //$NON-NLS-1$
32
	
32
33
    /**
33
	/**
34
     * Help prefixes.
34
	 * Boolean preference whether to use the advanced Inspect debug text hover. Default is <code>true</code>. 
35
     */
35
	 * @since 3.0
36
    public static final String PREFIX = GdbPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
36
	 */
37
    
37
	public static final String PREF_USE_INSPECTOR_HOVER = "useInspectorHover"; //$NON-NLS-1$
38
    public static final String PREFERENCE_PAGE= PREFIX + "preference_page_context"; //$NON-NLS-1$
38
39
}
39
    /**
40
40
     * Help prefixes.
41
     */
42
    public static final String PREFIX = GdbPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
43
    
44
    public static final String PREFERENCE_PAGE= PREFIX + "preference_page_context"; //$NON-NLS-1$
45
}
46
(-)src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java (-1 / +3 lines)
Lines 72-77 Link Here
72
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
72
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
73
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
73
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
74
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory;
74
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory;
75
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputProvider;
75
import org.eclipse.debug.ui.contexts.ISuspendTrigger;
76
import org.eclipse.debug.ui.contexts.ISuspendTrigger;
76
import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
77
import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
77
78
Lines 123-129 Link Here
123
            session.registerModelAdapter(SteppingController.class, fSteppingController);
124
            session.registerModelAdapter(SteppingController.class, fSteppingController);
124
125
125
            fViewModelAdapter = new GdbViewModelAdapter(session, fSteppingController);
126
            fViewModelAdapter = new GdbViewModelAdapter(session, fSteppingController);
126
127
            session.registerModelAdapter(IViewerInputProvider.class, fViewModelAdapter);
128
            
127
            if (launch.getSourceLocator() instanceof ISourceLookupDirector) {
129
            if (launch.getSourceLocator() instanceof ISourceLookupDirector) {
128
                fSourceDisplayAdapter = new DsfSourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator(), fSteppingController);
130
                fSourceDisplayAdapter = new DsfSourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator(), fSteppingController);
129
            } else {
131
            } else {
(-)src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbDebugTextHover.java (+12 lines)
Lines 12-19 Link Here
12
package org.eclipse.cdt.dsf.gdb.internal.ui;
12
package org.eclipse.cdt.dsf.gdb.internal.ui;
13
13
14
import org.eclipse.cdt.dsf.debug.ui.AbstractDsfDebugTextHover;
14
import org.eclipse.cdt.dsf.debug.ui.AbstractDsfDebugTextHover;
15
import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants;
15
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate;
16
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate;
16
import org.eclipse.cdt.dsf.mi.service.MIExpressions;
17
import org.eclipse.cdt.dsf.mi.service.MIExpressions;
18
import org.eclipse.core.runtime.Platform;
17
19
18
/**
20
/**
19
 * Debug editor text hover for GDB.
21
 * Debug editor text hover for GDB.
Lines 31-34 Link Here
31
	protected String getHoverFormat() {
33
	protected String getHoverFormat() {
32
    	return  MIExpressions.DETAILS_FORMAT;
34
    	return  MIExpressions.DETAILS_FORMAT;
33
    }
35
    }
36
37
    @Override
38
    protected boolean useExpressionExplorer() {
39
    	if (Platform.getPreferencesService().getBoolean("org.eclipse.cdt.dsf.gdb.ui",  //$NON-NLS-1$
40
				IGdbDebugPreferenceConstants.PREF_USE_INSPECTOR_HOVER,
41
				true, null)) {
42
    		return true;
43
    	}
44
    	return false;
45
    }
34
}
46
}
(-)src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbDebugPreferencePage.java (-1 / +17 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 Ericsson and others.
2
 * Copyright (c) 2009, 2010 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 84-89 Link Here
84
		// need to set layout again
84
		// need to set layout again
85
		group.setLayout(groupLayout);
85
		group.setLayout(groupLayout);
86
86
87
		group= new Group(parent, SWT.NONE);
88
		group.setText(MessagesForPreferences.GdbDebugPreferencePage_hover_label);
89
		groupLayout= new GridLayout(3, false);
90
		group.setLayout(groupLayout);
91
		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
92
93
		boolField= new BooleanFieldEditor(
94
				IGdbDebugPreferenceConstants.PREF_USE_INSPECTOR_HOVER,
95
				MessagesForPreferences.GdbDebugPreferencePage_useInspectorHover_label,
96
				group);
97
98
		boolField.fillIntoGrid(group, 3);
99
		addField(boolField);
100
		// need to set layout again
101
		group.setLayout(groupLayout);
102
87
	}
103
	}
88
104
89
	@Override
105
	@Override
(-)src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbPreferenceInitializer.java (-1 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 Ericsson and others.
2
 * Copyright (c) 2009, 2010 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 24-28 Link Here
24
		IPreferenceStore store = GdbUIPlugin.getDefault().getPreferenceStore();
24
		IPreferenceStore store = GdbUIPlugin.getDefault().getPreferenceStore();
25
		store.setDefault(IGdbDebugPreferenceConstants.PREF_TRACES_ENABLE, true);
25
		store.setDefault(IGdbDebugPreferenceConstants.PREF_TRACES_ENABLE, true);
26
		store.setDefault(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, true);
26
		store.setDefault(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, true);
27
		store.setDefault(IGdbDebugPreferenceConstants.PREF_USE_INSPECTOR_HOVER, true);
27
	}
28
	}
28
}
29
}
(-)src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/MessagesForPreferences.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 Ericsson and others.
2
 * Copyright (c) 2009, 2010 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 23-28 Link Here
23
	public static String GdbDebugPreferencePage_enableTraces_label;
23
	public static String GdbDebugPreferencePage_enableTraces_label;
24
	public static String GdbDebugPreferencePage_termination_label;
24
	public static String GdbDebugPreferencePage_termination_label;
25
	public static String GdbDebugPreferencePage_autoTerminateGdb_label;
25
	public static String GdbDebugPreferencePage_autoTerminateGdb_label;
26
	public static String GdbDebugPreferencePage_hover_label;
27
	public static String GdbDebugPreferencePage_useInspectorHover_label;
26
28
27
	static {
29
	static {
28
		// initialize resource bundle
30
		// initialize resource bundle
(-)src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/messages.properties (+3 lines)
Lines 16-18 Link Here
16
16
17
GdbDebugPreferencePage_termination_label=Termination
17
GdbDebugPreferencePage_termination_label=Termination
18
GdbDebugPreferencePage_autoTerminateGdb_label=Terminate GDB when last process exits
18
GdbDebugPreferencePage_autoTerminateGdb_label=Terminate GDB when last process exits
19
20
GdbDebugPreferencePage_hover_label=Debug Text Hover
21
GdbDebugPreferencePage_useInspectorHover_label=Use Debug Inspector Hover
(-)src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java (+4 lines)
Lines 11-18 Link Here
11
package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel;
11
package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel;
12
12
13
import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
13
import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
14
import org.eclipse.cdt.dsf.debug.ui.IDsfDebugUIConstants;
14
import org.eclipse.cdt.dsf.debug.ui.viewmodel.AbstractDebugVMAdapter;
15
import org.eclipse.cdt.dsf.debug.ui.viewmodel.AbstractDebugVMAdapter;
15
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
16
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
17
import org.eclipse.cdt.dsf.debug.ui.viewmodel.expression.ExpressionVMProvider;
16
import org.eclipse.cdt.dsf.debug.ui.viewmodel.modules.ModulesVMProvider;
18
import org.eclipse.cdt.dsf.debug.ui.viewmodel.modules.ModulesVMProvider;
17
import org.eclipse.cdt.dsf.debug.ui.viewmodel.register.RegisterVMProvider;
19
import org.eclipse.cdt.dsf.debug.ui.viewmodel.register.RegisterVMProvider;
18
import org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.breakpoints.GdbBreakpointVMProvider;
20
import org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.breakpoints.GdbBreakpointVMProvider;
Lines 50-55 Link Here
50
            return new RegisterVMProvider(this, context, getSession());
52
            return new RegisterVMProvider(this, context, getSession());
51
        } else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) {
53
        } else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) {
52
            return new GdbExpressionVMProvider(this, context, getSession());
54
            return new GdbExpressionVMProvider(this, context, getSession());
55
        } else if (IDsfDebugUIConstants.ID_EXPRESSION_HOVER.equals(context.getId()) ) {
56
            return new ExpressionVMProvider(this, context, getSession());
53
        } else if (IDebugUIConstants.ID_MODULE_VIEW.equals(context.getId()) ) {
57
        } else if (IDebugUIConstants.ID_MODULE_VIEW.equals(context.getId()) ) {
54
            return new ModulesVMProvider(this, context, getSession());
58
            return new ModulesVMProvider(this, context, getSession());
55
        } else if (IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(context.getId()) ) {
59
        } else if (IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(context.getId()) ) {

Return to bug 255026