1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[294351] Add a default hover for DSF.

This commit is contained in:
Marc Khouzam 2009-11-12 14:06:54 +00:00
parent b2d2eb2e19
commit 48fb821c7d
4 changed files with 64 additions and 17 deletions

View file

@ -57,3 +57,6 @@ StaleData.foreground.description=This color is used to indicate that a given ele
StaleData.background.label=Stale data background color
StaleData.background.description=This color is used to indicate that a given element of data in a view is stale. User should refresh the view to see current data. The background color is used only when the view is in no-columns mode.
editorTextHover.label=Debugger
editorTextHover.description=Shows formatted value in debugger hover

View file

@ -666,6 +666,15 @@
</description>
</colorDefinition>
</extension>
<extension
point="org.eclipse.cdt.ui.textHovers">
<hover
label="%editorTextHover.label"
description="%editorTextHover.description"
class="org.eclipse.cdt.dsf.debug.ui.DsfDebugTextHover"
id="org.eclipse.cdt.dsf.debug.ui.DsfDebugTextHover">
</hover>
</extension>
</plugin>

View file

@ -1,20 +1,13 @@
/**
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/
/*******************************************************************************
* Copyright (c) 2009 Nokia Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nokia Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.dsf.debug.ui;
import org.eclipse.cdt.debug.ui.editors.AbstractDebugTextHover;

View file

@ -0,0 +1,42 @@
/*******************************************************************************
* Copyright (c) 2009 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.dsf.debug.ui;
/**
* A default hover provided by DSF. Any hover provided by another
* debugger integration using DSF will automatically override this one
* based on the <code>BestMatchHover</code> class.
*
* @since 2.1
*/
public class DsfDebugTextHover extends AbstractDsfDebugTextHover {
/*
* This Hover should work for any model using DSF, so we don't
* use the getModelId() method.
*/
@Override
protected String getModelId() { return null; }
/*
* Override to not use the getModelId() method, since this hover should
* be valid for any modelId using DSF.
*/
@Override
protected boolean canEvaluate() {
if (getFrame() != null) {
return true;
}
return false;
}
}