author | dadubrow |
Tue, 17 Nov 2009 14:33:45 -0600 | |
changeset 116 | 05ea843f7d56 |
parent 37 | c2bce6dd59e7 |
permissions | -rw-r--r-- |
37 | 1 |
/******************************************************************************* |
2 |
* Copyright (c) 2007, 2008 Wind River Systems 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 |
|
7 |
* |
|
8 |
* Contributors: |
|
9 |
* Wind River Systems, Inc. - initial implementation |
|
10 |
*******************************************************************************/ |
|
11 |
package org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.numberformat.detail; |
|
12 |
||
13 |
import java.util.HashSet; |
|
14 |
import java.util.Set; |
|
15 |
||
16 |
import org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.detailsupport.MessagesForDetailPane; |
|
17 |
import org.eclipse.debug.ui.IDetailPane; |
|
18 |
import org.eclipse.debug.ui.IDetailPaneFactory; |
|
19 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
20 |
||
21 |
/** |
|
22 |
* This provides a simple Detail Pane Factory for the core debug views for DSF. |
|
23 |
*/ |
|
24 |
||
25 |
public class NumberFormatDetailPaneFactory implements IDetailPaneFactory { |
|
26 |
||
27 |
/* (non-Javadoc) |
|
28 |
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#createDetailsArea(java.lang.String) |
|
29 |
*/ |
|
30 |
public IDetailPane createDetailPane(String id) { |
|
31 |
return new NumberFormatDetailPane(); |
|
32 |
} |
|
33 |
||
34 |
/* (non-Javadoc) |
|
35 |
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDetailsTypes(org.eclipse.jface.viewers.IStructuredSelection) |
|
36 |
*/ |
|
37 |
@SuppressWarnings("unchecked") |
|
38 |
public Set getDetailPaneTypes(IStructuredSelection selection) { |
|
39 |
Set<String> possibleIDs = new HashSet<String>(1); |
|
40 |
possibleIDs.add(NumberFormatDetailPane.ID); |
|
41 |
return possibleIDs; |
|
42 |
} |
|
43 |
||
44 |
/* (non-Javadoc) |
|
45 |
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(java.util.Set, org.eclipse.jface.viewers.IStructuredSelection) |
|
46 |
*/ |
|
47 |
public String getDefaultDetailPane(IStructuredSelection selection) { |
|
116
05ea843f7d56
Turn off DSF detail pane preference to allow other detail panes to be default
dadubrow
parents:
37
diff
changeset
|
48 |
return null; // allow competing detail pane factories to override this one |
37 | 49 |
} |
50 |
||
51 |
/* (non-Javadoc) |
|
52 |
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getName(java.lang.String) |
|
53 |
*/ |
|
54 |
public String getDetailPaneName(String id) { |
|
55 |
if (id.equals(NumberFormatDetailPane.ID)){ |
|
56 |
return MessagesForDetailPane.NumberFormatDetailPane_Name; |
|
57 |
} |
|
58 |
return null; |
|
59 |
} |
|
60 |
||
61 |
/* (non-Javadoc) |
|
62 |
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDescription(java.lang.String) |
|
63 |
*/ |
|
64 |
public String getDetailPaneDescription(String id) { |
|
65 |
if (id.equals(NumberFormatDetailPane.ID)){ |
|
66 |
return MessagesForDetailPane.NumberFormatDetailPane_Description; |
|
67 |
} |
|
68 |
return null; |
|
69 |
} |
|
70 |
||
71 |
} |