1
/*******************************************************************************
2
* Copyright (c) 2000, 2010 IBM Corporation and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* IBM Corporation - initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.internal.ui.editor;
13
import org.eclipse.core.runtime.Assert;
14
import org.eclipse.jface.action.Action;
15
import org.eclipse.jface.action.IAction;
16
import org.eclipse.jface.text.IRegion;
17
import org.eclipse.jface.text.hyperlink.IHyperlink;
21
* C element hyperlink.
25
public class CElementHyperlink implements IHyperlink {
27
private final IRegion fRegion;
28
private final IAction fOpenAction;
32
* Creates a new C element hyperlink.
34
public CElementHyperlink(IRegion region, IAction openAction) {
35
Assert.isNotNull(openAction);
36
Assert.isNotNull(region);
39
fOpenAction= openAction;
42
public IRegion getHyperlinkRegion() {
50
public String getTypeLabel() {
54
public String getHyperlinkText() {
55
return Action.removeMnemonics(fOpenAction.getText());