mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
2005-02-01 Alain Magloire
Code From Chris: PR 83866 PR 83868 PR 83869 * browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypeHierarchyAction.java * browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpentTypeInHierarchyAction.java * browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypoeInHierarchDialog.java * browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyMessages.properties
This commit is contained in:
parent
9500493981
commit
40c31ad8f0
5 changed files with 54 additions and 3 deletions
|
@ -1,3 +1,13 @@
|
|||
2005-02-01 Alain Magloire
|
||||
Code From Chris:
|
||||
PR 83866
|
||||
PR 83868
|
||||
PR 83869
|
||||
* browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypeHierarchyAction.java
|
||||
* browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpentTypeInHierarchyAction.java
|
||||
* browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypoeInHierarchDialog.java
|
||||
* browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyMessages.properties
|
||||
|
||||
2004-11-24 Chris Wiebe
|
||||
|
||||
fix exception in OpenTypeInHierarchyAction
|
||||
|
|
|
@ -127,7 +127,7 @@ public class OpenTypeHierarchyAction extends SelectionDispatchAction {
|
|||
* Method declared on SelectionDispatchAction.
|
||||
*/
|
||||
public void selectionChanged(IStructuredSelection selection) {
|
||||
// setEnabled(isEnabled(selection));
|
||||
setEnabled(isEnabled(selection));
|
||||
}
|
||||
|
||||
private boolean isEnabled(IStructuredSelection selection) {
|
||||
|
|
|
@ -80,7 +80,7 @@ public class OpenTypeInHierarchyAction implements IWorkbenchWindowActionDelegate
|
|||
return;
|
||||
}
|
||||
|
||||
OpenTypeDialog dialog = new OpenTypeDialog(getShell());
|
||||
OpenTypeInHierarchyDialog dialog = new OpenTypeInHierarchyDialog(getShell());
|
||||
dialog.setElements(elements);
|
||||
int result = dialog.open();
|
||||
if (result != IDialogConstants.OK_ID)
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* QNX Software Systems - adapted for use in CDT
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.browser.typehierarchy;
|
||||
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.ui.browser.typeinfo.TypeSelectionDialog;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
/**
|
||||
* A dialog to select a type from a list of types. The selected type will be
|
||||
* opened in the editor.
|
||||
*/
|
||||
public class OpenTypeInHierarchyDialog extends TypeSelectionDialog {
|
||||
|
||||
private static final String DIALOG_SETTINGS= OpenTypeInHierarchyDialog.class.getName();
|
||||
private final int[] VISIBLE_TYPES = { ICElement.C_CLASS, ICElement.C_STRUCT };
|
||||
|
||||
/**
|
||||
* Constructs an instance of <code>OpenTypeDialog</code>.
|
||||
* @param parent the parent shell.
|
||||
*/
|
||||
public OpenTypeInHierarchyDialog(Shell parent) {
|
||||
super(parent);
|
||||
setTitle(TypeHierarchyMessages.getString("OpenTypeInHierarchyDialog.title")); //$NON-NLS-1$
|
||||
setMessage(TypeHierarchyMessages.getString("OpenTypeInHierarchyDialog.message")); //$NON-NLS-1$
|
||||
setVisibleTypes(VISIBLE_TYPES);
|
||||
setDialogSettings(DIALOG_SETTINGS);
|
||||
}
|
||||
}
|
|
@ -74,7 +74,7 @@ TraditionalHierarchyViewer.filtered.title=Hierarchy
|
|||
|
||||
TypeHierarchyViewPart.error.title=Open Type Hierarchy
|
||||
TypeHierarchyViewPart.error.message=The selected element only exists in the editor. To perform this operation you have to save the editor first.
|
||||
TypeHierarchyViewPart.empty=To display the type hierarchy, select a type (for example in the outline view or in the editor), and select the \'Open Type Hierarchy\' menu option. Alternatively, you can drag and drop an element (e.g. project, package, type) onto this view.
|
||||
TypeHierarchyViewPart.empty=To display the type hierarchy, select a structure or class (for example in the outline view or in the editor), and select the \'Open Type Hierarchy\' menu option.
|
||||
TypeHierarchyViewPart.nodecl=No declarations of selected members\nin the chosen hierarchy of ''{0}''
|
||||
TypeHierarchyViewPart.exception.title=Type Hierarchy
|
||||
TypeHierarchyViewPart.exception.message=Creating hierarchy failed. Check log for details.
|
||||
|
@ -84,6 +84,9 @@ TypeHierarchyViewPart.tooltip={0} of ''{1}''
|
|||
|
||||
TypeHierarchyViewPart.layout.submenu=&Layout
|
||||
|
||||
OpenTypeInHierarchyDialog.title=Open Type In Hierarchy
|
||||
OpenTypeInHierarchyDialog.message=&Choose a type (? = any character, * = any string):
|
||||
|
||||
ToggleViewAction.subtypes.label=Subtype Hierarchy
|
||||
ToggleViewAction.subtypes.tooltip=Show the Subtype Hierarchy
|
||||
ToggleViewAction.subtypes.description=Show the subtype hierarchy
|
||||
|
|
Loading…
Add table
Reference in a new issue