Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2004-07-16 12:25:56 -0400
committerAlain Magloire2004-07-16 12:25:56 -0400
commit9766cb70c62b71c3d08bd2866ef0736046c8b83b (patch)
treec7f3f89f3bcfa7ab165f5975ece8d90ffb328c59
parent96c17aa99785480742c5fc45275951e75911706f (diff)
downloadorg.eclipse.cdt-9766cb70c62b71c3d08bd2866ef0736046c8b83b.tar.gz
org.eclipse.cdt-9766cb70c62b71c3d08bd2866ef0736046c8b83b.tar.xz
org.eclipse.cdt-9766cb70c62b71c3d08bd2866ef0736046c8b83b.zip
2004-07-16 Chris Wiebe
Fixing numerous warnings.
-rw-r--r--core/org.eclipse.cdt.core/browser/ChangeLog-browser4
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/AllTypesCache.java2
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeInfo.java2
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java3
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/typehierarchy/TypeHierarchy.java15
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java1
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCache.java5
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCacheManager.java2
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeParser.java23
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/util/DelegatedProgressMonitor.java8
-rw-r--r--core/org.eclipse.cdt.ui/ChangeLog4
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/CHierarchyPerspectiveFactory.java67
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/EnableMemberFilterAction.java8
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/FocusOnTypeAction.java7
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyLabelProvider.java18
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyViewerSorter.java3
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HistoryListAction.java17
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsContentProvider.java6
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsLabelProvider.java3
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsViewer.java7
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypeHierarchyUtil.java8
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SelectionProviderMediator.java2
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowInheritedMembersAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowQualifiedTypeNamesAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SortByDefiningTypeAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyContentProvider.java3
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyLifeCycle.java19
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewPart.java198
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewer.java15
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/plugin.xml2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java1
32 files changed, 211 insertions, 252 deletions
diff --git a/core/org.eclipse.cdt.core/browser/ChangeLog-browser b/core/org.eclipse.cdt.core/browser/ChangeLog-browser
index a6b22141ad..4b0d271101 100644
--- a/core/org.eclipse.cdt.core/browser/ChangeLog-browser
+++ b/core/org.eclipse.cdt.core/browser/ChangeLog-browser
@@ -1,3 +1,7 @@
+2004-07-16 Chris Wiebe
+
+ Fixing numerous warnings.
+
2004-07-06 Chris Wiebe
This patch prevents some NPEs from happening in the class browser. I
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/AllTypesCache.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/AllTypesCache.java
index f0dbf6ee40..3ae26d8c51 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/AllTypesCache.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/AllTypesCache.java
@@ -53,7 +53,7 @@ public class AllTypesCache {
private static TypeHierarchyBuilder fgTypeHierarchyBuilder;
private static IElementChangedListener fgElementChangedListener;
private static IPropertyChangeListener fgPropertyChangeListener;
- private static boolean fgEnableIndexing = true;
+ static boolean fgEnableIndexing = true;
/** Preference key for enabling background cache */
public final static String ENABLE_BACKGROUND_TYPE_CACHE = "enableBackgroundTypeCache"; //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeInfo.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeInfo.java
index 7d9c412a32..117929e491 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeInfo.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeInfo.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.cdt.core.browser;
-import java.util.Iterator;
-
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
import org.eclipse.cdt.internal.core.browser.cache.ITypeCache;
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java
index 9168ff6a68..a4e4e1188e 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java
@@ -6,13 +6,11 @@
*/
package org.eclipse.cdt.core.browser;
-import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.cdt.core.browser.typehierarchy.ITypeHierarchy;
import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.Flags;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICElementVisitor;
import org.eclipse.cdt.core.model.ICProject;
@@ -20,7 +18,6 @@ import org.eclipse.cdt.core.model.IMember;
import org.eclipse.cdt.core.model.IMethodDeclaration;
import org.eclipse.cdt.core.model.IParent;
import org.eclipse.cdt.core.model.IStructure;
-import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
import org.eclipse.cdt.internal.core.browser.cache.ITypeCache;
import org.eclipse.cdt.internal.core.browser.cache.TypeCacheManager;
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/typehierarchy/TypeHierarchy.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/typehierarchy/TypeHierarchy.java
index 5978c9dcdd..07caef7c2a 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/typehierarchy/TypeHierarchy.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/typehierarchy/TypeHierarchy.java
@@ -31,8 +31,6 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.IElementChangedListener;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
import org.eclipse.cdt.core.search.ICSearchScope;
-import org.eclipse.cdt.internal.core.browser.cache.TypeCacheManager;
-import org.eclipse.cdt.internal.core.model.CElement;
import org.eclipse.cdt.internal.core.model.Util;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -55,7 +53,6 @@ public class TypeHierarchy implements ITypeHierarchy, IElementChangedListener {
private static final int INITIAL_SUPER_TYPES = 1;
private static final int INITIAL_SUB_TYPES = 1;
private static final ITypeInfo[] NO_TYPES = new ITypeInfo[0];
- private ArrayList fAllTypes = new ArrayList();
private ArrayList fRootTypes = new ArrayList();
private Map fTypeToSuperTypes = new HashMap();
private Map fTypeToSubTypes = new HashMap();
@@ -90,10 +87,10 @@ public class TypeHierarchy implements ITypeHierarchy, IElementChangedListener {
* Whether this hierarchy needs refresh
*/
public boolean fNeedsRefresh = true;
- /*
- * Collects changes to types
- */
- protected ChangeCollector fChangeCollector;
+// /*
+// * Collects changes to types
+// */
+// protected ChangeCollector fChangeCollector;
@@ -268,7 +265,7 @@ public class TypeHierarchy implements ITypeHierarchy, IElementChangedListener {
* Returns true if the given delta could change this type hierarchy
*/
public synchronized boolean isAffected(ICElementDelta delta) {
- ICElement element= delta.getElement();
+// ICElement element= delta.getElement();
// switch (element.getElementType()) {
// case ICElement.C_MODEL:
// return isAffectedByCModel(delta, element);
@@ -519,7 +516,7 @@ public class TypeHierarchy implements ITypeHierarchy, IElementChangedListener {
compute();
// initializeRegions();
fNeedsRefresh = false;
- fChangeCollector = null;
+// fChangeCollector = null;
if (DEBUG) {
if (fComputeSubtypes) {
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java
index 6de268386c..c329bb53f0 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java
@@ -30,7 +30,6 @@ import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
public class IndexerTypesJob extends IndexerJob {
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCache.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCache.java
index e0122dd2a2..76f2ab3aa1 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCache.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCache.java
@@ -48,8 +48,8 @@ public class TypeCache implements ITypeCache {
private final Map fTypeKeyMap = new HashMap(INITIAL_TYPE_COUNT);
private final IProject fProject;
private final IWorkingCopyProvider fWorkingCopyProvider;
- private final Collection fDeltas = new ArrayList();
- private final ITypeInfo fGlobalNamespace;
+ final Collection fDeltas = new ArrayList();
+ final ITypeInfo fGlobalNamespace;
private final Map fTypeToSubTypes = new HashMap();
private final Map fTypeToSuperTypes = new HashMap();
@@ -297,7 +297,6 @@ public class TypeCache implements ITypeCache {
IQualifiedTypeName enclosingName = newType.getQualifiedTypeName().getEnclosingTypeName();
if (enclosingName != null) {
while (!enclosingName.isEmpty()) {
- boolean foundType = false;
// try namespace, class, struct, then undefined
ITypeInfo enclosingType = null;
for (int i = 0; enclosingType == null && i < ENCLOSING_TYPES.length; ++i) {
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCacheManager.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCacheManager.java
index cd6f77dcc6..ba731eb7f7 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCacheManager.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeCacheManager.java
@@ -13,10 +13,8 @@ package org.eclipse.cdt.internal.core.browser.cache;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.cdt.core.browser.IQualifiedTypeName;
import org.eclipse.cdt.core.browser.ITypeInfo;
import org.eclipse.cdt.core.browser.IWorkingCopyProvider;
-import org.eclipse.cdt.core.browser.QualifiedTypeName;
import org.eclipse.cdt.core.browser.TypeSearchScope;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICElementDelta;
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeParser.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeParser.java
index f7493af6ae..3beb079f73 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeParser.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/TypeParser.java
@@ -53,11 +53,9 @@ import org.eclipse.cdt.core.parser.ScannerInfo;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
import org.eclipse.cdt.core.parser.ast.ASTNotImplementedException;
-import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier;
-import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier;
-import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration;
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
import org.eclipse.cdt.core.parser.ast.IASTAbstractTypeSpecifierDeclaration;
+import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier;
import org.eclipse.cdt.core.parser.ast.IASTClassReference;
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
import org.eclipse.cdt.core.parser.ast.IASTCodeScope;
@@ -87,6 +85,7 @@ import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
import org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation;
import org.eclipse.cdt.core.parser.ast.IASTTemplateParameterReference;
import org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization;
+import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier;
import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration;
import org.eclipse.cdt.core.parser.ast.IASTTypedefReference;
import org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration;
@@ -115,7 +114,7 @@ public class TypeParser implements ISourceElementRequestor {
private IProject fProject;
private IWorkingCopyProvider fWorkingCopyProvider;
private IProgressMonitor fProgressMonitor;
- private ISourceElementCallbackDelegate fLastDeclaration;
+ ISourceElementCallbackDelegate fLastDeclaration;
private final SimpleStack fScopeStack = new SimpleStack();
private final SimpleStack fResourceStack = new SimpleStack();
private ITypeInfo fTypeToFind;
@@ -660,19 +659,6 @@ public class TypeParser implements ISourceElementRequestor {
fResourceStack.pop();
}
- private String[] getEnclosingNames(IASTOffsetableNamedElement elem) {
- String[] enclosingNames = null;
- if (elem instanceof IASTQualifiedNameElement) {
- String[] names = ((IASTQualifiedNameElement) elem).getFullyQualifiedName();
- if (names != null && names.length > 1) {
- enclosingNames = new String[names.length - 1];
- System.arraycopy(names, 0, enclosingNames, 0, names.length - 1);
- }
- }
- return enclosingNames;
- }
-
-
private class NodeTypeInfo {
int type;
String name;
@@ -806,7 +792,7 @@ public class TypeParser implements ISourceElementRequestor {
}
}
- private int getElementType(IASTOffsetableNamedElement offsetable) {
+ int getElementType(IASTOffsetableNamedElement offsetable) {
if (offsetable instanceof IASTClassSpecifier || offsetable instanceof IASTElaboratedTypeSpecifier) {
ASTClassKind kind = null;
if (offsetable instanceof IASTClassSpecifier) {
@@ -837,7 +823,6 @@ public class TypeParser implements ISourceElementRequestor {
while (baseIter.hasNext()) {
IASTBaseSpecifier baseSpec = (IASTBaseSpecifier) baseIter.next();
try {
- String baseName = baseSpec.getParentClassName();
ASTAccessVisibility baseAccess = baseSpec.getAccess();
IASTClassSpecifier parentClass = null;
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/util/DelegatedProgressMonitor.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/util/DelegatedProgressMonitor.java
index 609a172d33..7074a4c4d6 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/util/DelegatedProgressMonitor.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/util/DelegatedProgressMonitor.java
@@ -26,12 +26,12 @@ public class DelegatedProgressMonitor implements IProgressMonitor, IProgressMoni
private static int INITIAL_DELEGATE_COUNT = 2;
private final ArrayList fDelegateList = new ArrayList(INITIAL_DELEGATE_COUNT);
- private String fTaskName;
- private String fSubTask;
- private int fTotalWork;
+ String fTaskName;
+ String fSubTask;
+ int fTotalWork;
private double fWorked;
private boolean fIsBlocked;
- private boolean fIsCanceled;
+ boolean fIsCanceled;
/**
* Creates a new delegated monitor.
diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog
index 1586662efa..79c0c06aff 100644
--- a/core/org.eclipse.cdt.ui/ChangeLog
+++ b/core/org.eclipse.cdt.ui/ChangeLog
@@ -1,3 +1,7 @@
+2004-07-16 Chris Wiebe
+
+ Fixing numerous warnings.
+
2004-07-15 Tanya Wolff
Fix for 70124: unexternalized strings
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/CHierarchyPerspectiveFactory.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/CHierarchyPerspectiveFactory.java
new file mode 100644
index 0000000000..e0125745c7
--- /dev/null
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/CHierarchyPerspectiveFactory.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.ui.browser.typehierarchy;
+
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.search.ui.NewSearchUI;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.IPlaceholderFolderLayout;
+import org.eclipse.ui.console.IConsoleConstants;
+
+public class CHierarchyPerspectiveFactory implements IPerspectiveFactory {
+
+ /**
+ * Constructs a new Java hierarchy layout engine.
+ */
+ public CHierarchyPerspectiveFactory() {
+ super();
+ }
+
+ public void createInitialLayout(IPageLayout layout) {
+ String editorArea = layout.getEditorArea();
+
+ IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$
+ folder.addView(CUIPlugin.ID_TYPE_HIERARCHY);
+ folder.addPlaceholder(IPageLayout.ID_OUTLINE);
+ folder.addPlaceholder(CUIPlugin.CVIEW_ID);
+ folder.addPlaceholder(IPageLayout.ID_RES_NAV);
+
+ IPlaceholderFolderLayout outputfolder= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$
+ outputfolder.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
+ outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
+ outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
+ outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
+// outputfolder.addPlaceholder(CUIPlugin.ID_SOURCE_VIEW);
+// outputfolder.addPlaceholder(CUIPlugin.ID_JAVADOC_VIEW);
+// outputfolder.addPlaceholder(CPerspectiveFactory.ID_PROGRESS_VIEW);
+
+// layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
+// layout.addActionSet(JavaUI.ID_ACTION_SET);
+// layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
+
+ // views - java
+ layout.addShowViewShortcut(CUIPlugin.CVIEW_ID);
+ layout.addShowViewShortcut(CUIPlugin.ID_TYPE_HIERARCHY);
+
+ layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
+
+ // views - debugging
+ layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
+
+ // views - standard workbench
+ layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
+ layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
+ layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
+ }
+}
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/EnableMemberFilterAction.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/EnableMemberFilterAction.java
index 2a03e19d74..8e2c574fe8 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/EnableMemberFilterAction.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/EnableMemberFilterAction.java
@@ -10,12 +10,10 @@
*******************************************************************************/
package org.eclipse.cdt.internal.ui.browser.typehierarchy;
-import org.eclipse.swt.custom.BusyIndicator;
-
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.jface.action.Action;
-
+import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.ui.help.WorkbenchHelp;
/**
@@ -23,7 +21,7 @@ import org.eclipse.ui.help.WorkbenchHelp;
*/
public class EnableMemberFilterAction extends Action {
- private TypeHierarchyViewPart fView;
+ TypeHierarchyViewPart fView;
public EnableMemberFilterAction(TypeHierarchyViewPart v, boolean initValue) {
super(TypeHierarchyMessages.getString("EnableMemberFilterAction.label")); //$NON-NLS-1$
@@ -35,7 +33,7 @@ public class EnableMemberFilterAction extends Action {
fView= v;
setChecked(initValue);
-// WorkbenchHelp.setHelp(this, ICHelpContextIds.ENABLE_METHODFILTER_ACTION);
+ WorkbenchHelp.setHelp(this, ICHelpContextIds.ENABLE_METHODFILTER_ACTION);
}
/*
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/FocusOnTypeAction.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/FocusOnTypeAction.java
index 38546815af..d63738511b 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/FocusOnTypeAction.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/FocusOnTypeAction.java
@@ -12,17 +12,13 @@ package org.eclipse.cdt.internal.ui.browser.typehierarchy;
import java.lang.reflect.InvocationTargetException;
-import org.eclipse.swt.widgets.Shell;
-
import org.eclipse.cdt.core.browser.AllTypesCache;
import org.eclipse.cdt.core.browser.ITypeInfo;
-import org.eclipse.cdt.core.browser.ITypeReference;
import org.eclipse.cdt.core.browser.ITypeSearchScope;
import org.eclipse.cdt.core.browser.TypeSearchScope;
import org.eclipse.cdt.core.browser.TypeUtil;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
-import org.eclipse.cdt.internal.ui.browser.opentype.OpenTypeDialog;
import org.eclipse.cdt.internal.ui.browser.opentype.OpenTypeMessages;
import org.eclipse.cdt.internal.ui.util.ExceptionHandler;
import org.eclipse.cdt.ui.CUIPlugin;
@@ -30,9 +26,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
-
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.progress.IProgressService;
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyLabelProvider.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyLabelProvider.java
index dbb587bbc7..9d0841f98c 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyLabelProvider.java
@@ -10,31 +10,27 @@
*******************************************************************************/
package org.eclipse.cdt.internal.ui.browser.typehierarchy;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Display;
-
import org.eclipse.cdt.core.browser.TypeUtil;
import org.eclipse.cdt.core.browser.typehierarchy.ITypeHierarchy;
import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.Flags;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMethod;
import org.eclipse.cdt.core.model.IMethodDeclaration;
import org.eclipse.cdt.core.model.IStructure;
-import org.eclipse.cdt.internal.core.browser.cache.TypeCacheManager;
import org.eclipse.cdt.internal.ui.CElementImageProvider;
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
-import org.eclipse.cdt.internal.ui.browser.cbrowsing.AppearanceAwareLabelProvider;
import org.eclipse.cdt.ui.CElementImageDescriptor;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.jface.resource.CompositeImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Display;
/**
* Label provider for the hierarchy viewers. Types in the hierarchy that are not belonging to the
@@ -160,7 +156,7 @@ public class HierarchyLabelProvider extends StandardCElementLabelProvider // App
ImageDescriptor desc;
if (isDifferentScope(type)) {
- desc = fImageLabelProvider.getClassImageDescriptor();
+ desc = CElementImageProvider.getClassImageDescriptor();
} else {
desc= fImageLabelProvider.getBaseImageDescriptor(type, 0);
}
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyViewerSorter.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyViewerSorter.java
index d033338035..434ebc1a61 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyViewerSorter.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HierarchyViewerSorter.java
@@ -13,12 +13,9 @@ package org.eclipse.cdt.internal.ui.browser.typehierarchy;
import org.eclipse.cdt.core.browser.TypeUtil;
import org.eclipse.cdt.core.browser.typehierarchy.ITypeHierarchy;
import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.Flags;
import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.IMethod;
import org.eclipse.cdt.core.model.IMethodDeclaration;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
-import org.eclipse.cdt.internal.corext.util.CModelUtil;
import org.eclipse.cdt.ui.CElementSorter;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HistoryListAction.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HistoryListAction.java
index 30f0f6e17f..180baa6105 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HistoryListAction.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/HistoryListAction.java
@@ -25,18 +25,15 @@ import org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField;
import org.eclipse.cdt.ui.CElementLabelProvider;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.core.runtime.IStatus;
-
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-
import org.eclipse.ui.help.WorkbenchHelp;
public class HistoryListAction extends Action {
@@ -107,18 +104,18 @@ public class HistoryListAction extends Action {
/**
* Method doCustomButtonPressed.
*/
- private void doCustomButtonPressed() {
+ void doCustomButtonPressed() {
fHistoryList.removeElements(fHistoryList.getSelectedElements());
}
- private void doDoubleClicked() {
+ void doDoubleClicked() {
if (fHistoryStatus.isOK()) {
okPressed();
}
}
- private void doSelectionChanged() {
+ void doSelectionChanged() {
StatusInfo status= new StatusInfo();
List selected= fHistoryList.getSelectedElements();
if (selected.size() != 1) {
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsContentProvider.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsContentProvider.java
index 0343cac679..f80d84e929 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsContentProvider.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsContentProvider.java
@@ -13,19 +13,13 @@ package org.eclipse.cdt.internal.ui.browser.typehierarchy;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.cdt.core.browser.IWorkingCopyProvider;
import org.eclipse.cdt.core.browser.TypeUtil;
import org.eclipse.cdt.core.browser.typehierarchy.ITypeHierarchy;
-import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.IMethodDeclaration;
import org.eclipse.cdt.ui.CElementContentProvider;
-import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
/**
* Content provider used for the method view.
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsLabelProvider.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsLabelProvider.java
index f903bf5af3..81da430f36 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsLabelProvider.java
@@ -14,13 +14,10 @@ import org.eclipse.cdt.core.browser.TypeUtil;
import org.eclipse.cdt.core.browser.typehierarchy.ITypeHierarchy;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.IMember;
import org.eclipse.cdt.core.model.IMethod;
import org.eclipse.cdt.core.model.IMethodDeclaration;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
-import org.eclipse.cdt.internal.corext.util.CModelUtil;
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
-import org.eclipse.cdt.internal.ui.browser.cbrowsing.AppearanceAwareLabelProvider;
import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsViewer.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsViewer.java
index 2023ee811e..197166e12a 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsViewer.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/MethodsViewer.java
@@ -15,14 +15,9 @@ import java.util.List;
import org.eclipse.cdt.core.browser.TypeUtil;
import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.IMethod;
import org.eclipse.cdt.core.model.IMethodDeclaration;
-import org.eclipse.cdt.internal.ui.ICHelpContextIds;
-import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
-import org.eclipse.cdt.internal.ui.browser.cbrowsing.DecoratingCLabelProvider;
import org.eclipse.cdt.internal.ui.util.ProblemTableViewer;
import org.eclipse.cdt.internal.ui.util.SelectionUtil;
-import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
import org.eclipse.cdt.ui.CElementLabelProvider;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.actions.MemberFilterActionGroup;
@@ -31,9 +26,7 @@ import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypeHierarchyUtil.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypeHierarchyUtil.java
index 1ed97876c0..82402076db 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypeHierarchyUtil.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/OpenTypeHierarchyUtil.java
@@ -10,15 +10,11 @@
*******************************************************************************/
package org.eclipse.cdt.internal.ui.browser.typehierarchy;
-import java.security.Signature;
-
import org.eclipse.cdt.core.browser.TypeUtil;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMember;
-import org.eclipse.cdt.core.model.IParent;
import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.internal.corext.util.CModelUtil;
import org.eclipse.cdt.internal.ui.CUIMessages;
import org.eclipse.cdt.internal.ui.actions.OpenActionUtil;
import org.eclipse.cdt.internal.ui.util.EditorUtility;
@@ -91,7 +87,7 @@ public class OpenTypeHierarchyUtil {
result.setInputElement(input);
if (input instanceof IMember) {
- result.selectMember((IMember) input);
+ result.selectMember(input);
}
return result;
} catch (CoreException e) {
@@ -125,7 +121,7 @@ public class OpenTypeHierarchyUtil {
part= (TypeHierarchyViewPart) page.showView(CUIPlugin.ID_TYPE_HIERARCHY);
part.setInputElement(perspectiveInput);
if (input instanceof IMember) {
- part.selectMember((IMember) input);
+ part.selectMember(input);
if (page.getEditorReferences().length == 0) {
openEditor(input, false); // only open when the perspecive has been created
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SelectionProviderMediator.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SelectionProviderMediator.java
index 535ec748f3..b01d19a072 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SelectionProviderMediator.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SelectionProviderMediator.java
@@ -88,7 +88,7 @@ public class SelectionProviderMediator implements IPostSelectionProvider {
}
}
- private void doFocusChanged(Widget control) {
+ void doFocusChanged(Widget control) {
for (int i= 0; i < fViewers.length; i++) {
if (fViewers[i].getControl() == control) {
propagateFocusChanged(fViewers[i]);
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowInheritedMembersAction.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowInheritedMembersAction.java
index c0d73b03ab..e1708a3fe5 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowInheritedMembersAction.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowInheritedMembersAction.java
@@ -24,7 +24,7 @@ import org.eclipse.ui.help.WorkbenchHelp;
*/
public class ShowInheritedMembersAction extends Action {
- private MethodsViewer fMethodsViewer;
+ MethodsViewer fMethodsViewer;
/**
* Creates the action.
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowQualifiedTypeNamesAction.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowQualifiedTypeNamesAction.java
index 9a3fee13a9..8c8c756105 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowQualifiedTypeNamesAction.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/ShowQualifiedTypeNamesAction.java
@@ -23,7 +23,7 @@ import org.eclipse.jface.action.Action;
*/
public class ShowQualifiedTypeNamesAction extends Action {
- private TypeHierarchyViewPart fView;
+ TypeHierarchyViewPart fView;
public ShowQualifiedTypeNamesAction(TypeHierarchyViewPart v, boolean initValue) {
super(TypeHierarchyMessages.getString("ShowQualifiedTypeNamesAction.label")); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SortByDefiningTypeAction.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SortByDefiningTypeAction.java
index 9c621df814..dea6763692 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SortByDefiningTypeAction.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/SortByDefiningTypeAction.java
@@ -23,7 +23,7 @@ import org.eclipse.ui.help.WorkbenchHelp;
*/
public class SortByDefiningTypeAction extends Action {
- private MethodsViewer fMethodsViewer;
+ MethodsViewer fMethodsViewer;
/**
* Creates the action.
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyContentProvider.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyContentProvider.java
index e10c0fbdd3..901e860452 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyContentProvider.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyContentProvider.java
@@ -13,15 +13,12 @@ package org.eclipse.cdt.internal.ui.browser.typehierarchy;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.cdt.core.browser.IWorkingCopyProvider;
import org.eclipse.cdt.core.browser.TypeUtil;
import org.eclipse.cdt.core.browser.typehierarchy.ITypeHierarchy;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMember;
-import org.eclipse.cdt.core.model.IMethod;
import org.eclipse.cdt.core.model.IMethodDeclaration;
-import org.eclipse.cdt.internal.corext.util.CModelUtil;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyLifeCycle.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyLifeCycle.java
index 7c0796887e..87918f78ab 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyLifeCycle.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyLifeCycle.java
@@ -22,7 +22,6 @@ import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ElementChangedEvent;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICElementDelta;
-import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.IElementChangedListener;
import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -38,7 +37,6 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
private boolean fHierarchyRefreshNeeded;
private ITypeHierarchy fHierarchy;
private ICElement fInputElement;
- private boolean fIsSuperTypesOnly;
private List fChangeListeners;
@@ -49,7 +47,6 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
public TypeHierarchyLifeCycle(boolean isSuperTypesOnly) {
fHierarchy= null;
fInputElement= null;
- fIsSuperTypesOnly= isSuperTypesOnly;
fChangeListeners= new ArrayList(2);
}
@@ -118,15 +115,7 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
if (element.getElementType() == ICElement.C_CLASS
|| element.getElementType() == ICElement.C_STRUCT) {
return AllTypesCache.createTypeHierarchy(element, pm);
- }
-// if (element.getElementType() == ICElement.TYPE) {
-// IType type= (IType) element;
-// if (fIsSuperTypesOnly) {
-// return type.newSupertypeHierarchy(pm);
-// } else {
-// return type.newTypeHierarchy(pm);
-// }
-// } else {
+ } else {
// IRegion region= JavaCore.newRegion();
// if (element.getElementType() == ICElement.JAVA_PROJECT) {
// // for projects only add the contained source folders
@@ -150,8 +139,8 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
// }
// ICProject jproject= element.getCProject();
// return jproject.newTypeHierarchy(region, pm);
-// }
- return null;
+ return null;
+ }
}
@@ -215,7 +204,7 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
// case ICElement.TYPE:
case ICElement.C_CLASS:
case ICElement.C_STRUCT:
- processTypeDelta((ICElement) element, changedTypes);
+ processTypeDelta(element, changedTypes);
processChildrenDelta(delta, changedTypes); // (inner types)
break;
case ICElement.C_MODEL:
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewPart.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewPart.java
index f9f086736d..b2e7492fac 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewPart.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewPart.java
@@ -21,6 +21,7 @@ import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMember;
import org.eclipse.cdt.core.model.IStructure;
import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
import org.eclipse.cdt.internal.ui.actions.CompositeActionGroup;
import org.eclipse.cdt.internal.ui.actions.SelectAllAction;
@@ -46,11 +47,11 @@ import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.IBasicPropertyConstants;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -63,7 +64,6 @@ import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.ViewForm;
-import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.events.FocusEvent;
@@ -92,6 +92,7 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.part.IShowInSource;
import org.eclipse.ui.part.IShowInTargetList;
import org.eclipse.ui.part.PageBook;
@@ -103,7 +104,6 @@ import org.eclipse.ui.part.ViewPart;
*/
public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyViewPart, IViewPartInputProvider {
-// public static final int VIEW_ID_TYPE= 2;
public static final int VIEW_ID_SUPER= 0;
public static final int VIEW_ID_SUB= 1;
@@ -115,11 +115,11 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
private static final String DIALOGSTORE_HIERARCHYVIEW= "TypeHierarchyViewPart.hierarchyview"; //$NON-NLS-1$
private static final String DIALOGSTORE_VIEWORIENTATION= "TypeHierarchyViewPart.orientation"; //$NON-NLS-1$
- private static final String TAG_INPUT= "input"; //$NON-NLS-1$
+ //private static final String TAG_INPUT= "input"; //$NON-NLS-1$
private static final String TAG_VIEW= "view"; //$NON-NLS-1$
private static final String TAG_ORIENTATION= "orientation"; //$NON-NLS-1$
private static final String TAG_RATIO= "ratio"; //$NON-NLS-1$
- private static final String TAG_SELECTION= "selection"; //$NON-NLS-1$
+ //private static final String TAG_SELECTION= "selection"; //$NON-NLS-1$
private static final String TAG_VERTICAL_SCROLL= "vertical_scroll"; //$NON-NLS-1$
private static final String GROUP_FOCUS= "group.focus"; //$NON-NLS-1$
@@ -134,9 +134,9 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
private ArrayList fInputHistory;
private IMemento fMemento;
-// private IDialogSettings fDialogSettings;
+ private IDialogSettings fDialogSettings;
- private TypeHierarchyLifeCycle fHierarchyLifeCycle;
+ protected TypeHierarchyLifeCycle fHierarchyLifeCycle;
private ITypeHierarchyLifeCycleListener fTypeHierarchyLifeCycleListener;
private IPropertyChangeListener fPropertyChangeListener;
@@ -155,16 +155,16 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
private boolean fIsVisible;
private boolean fNeedRefresh;
private boolean fIsEnableMemberFilter;
- private boolean fIsRefreshRunnablePosted;
+ protected boolean fIsRefreshRunnablePosted;
private int fCurrentViewerIndex;
private TypeHierarchyViewer[] fAllViewers;
- private MethodsViewer fMethodsViewer;
+ protected MethodsViewer fMethodsViewer;
private SashForm fTypeMethodsSplitter;
private PageBook fViewerbook;
- private PageBook fPagebook;
+ protected PageBook fPagebook;
private Label fNoHierarchyShownLabel;
private Label fEmptyTypesViewer;
@@ -186,7 +186,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
private FocusOnTypeAction fFocusOnTypeAction;
private FocusOnSelectionAction fFocusOnSelectionAction;
private CompositeActionGroup fActionGroups;
- private SelectAllAction fSelectAllAction;
+ protected SelectAllAction fSelectAllAction;
private WorkingSetFilterActionGroup fWorkingSetActionGroup;
private Job fRestoreStateJob;
@@ -220,13 +220,12 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
fAllViewers= null;
fViewActions= new ToggleViewAction[] {
-// new ToggleViewAction(this, VIEW_ID_TYPE),
new ToggleViewAction(this, VIEW_ID_SUPER),
new ToggleViewAction(this, VIEW_ID_SUB)
};
-// fDialogSettings= CPlugin.getDefault().getDialogSettings();
-//
+ fDialogSettings= CUIPlugin.getDefault().getDialogSettings();
+
fHistoryDropDownAction= new HistoryDropDownAction(this);
fHistoryDropDownAction.setEnabled(false);
@@ -361,8 +360,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
*/
public void selectMember(ICElement member) {
fSelectInEditor= false;
-// if (member.getElementType() != ICElement.TYPE) {
- if (!(member instanceof IStructure)) {
+ if (!TypeUtil.isClassOrStruct(member)) {
Control methodControl= fMethodsViewer.getControl();
if (methodControl != null && !methodControl.isDisposed()) {
methodControl.setFocus();
@@ -386,10 +384,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
* @deprecated
*/
public ICElement getInput() {
- if (fInputElement instanceof ICElement) {
- return (ICElement) fInputElement;
- }
- return null;
+ return fInputElement;
}
/**
@@ -470,9 +465,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
return;
}
-// if (inputElement.getElementType() != ICElement.TYPE) {
- if (!(inputElement instanceof IStructure)) {
-// setView(VIEW_ID_TYPE);
+ if (!TypeUtil.isClassOrStruct(inputElement)) {
setView(VIEW_ID_SUPER);
}
// turn off member filtering
@@ -574,25 +567,19 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
TypeHierarchyViewer subTypesViewer= new SubTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this);
initializeTypesViewer(subTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUBTYPES_VIEW);
-// TypeHierarchyViewer vajViewer= new TraditionalHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this);
-// initializeTypesViewer(vajViewer, keyListener, IContextMenuConstants.TARGET_ID_HIERARCHY_VIEW);
-
-// fAllViewers= new TypeHierarchyViewer[3];
fAllViewers= new TypeHierarchyViewer[2];
fAllViewers[VIEW_ID_SUPER]= superTypesViewer;
fAllViewers[VIEW_ID_SUB]= subTypesViewer;
-// fAllViewers[VIEW_ID_TYPE]= vajViewer;
int currViewerIndex;
-// try {
-// currViewerIndex= fDialogSettings.getInt(DIALOGSTORE_HIERARCHYVIEW);
-// if (currViewerIndex < 0 || currViewerIndex > 2) {
-// currViewerIndex= VIEW_ID_TYPE;
-// }
-// } catch (NumberFormatException e) {
-// currViewerIndex= VIEW_ID_TYPE;
-// }
- currViewerIndex= VIEW_ID_SUPER;
+ try {
+ currViewerIndex= fDialogSettings.getInt(DIALOGSTORE_HIERARCHYVIEW);
+ if (currViewerIndex < 0 || currViewerIndex > 2) {
+ currViewerIndex= VIEW_ID_SUPER;
+ }
+ } catch (NumberFormatException e) {
+ currViewerIndex= VIEW_ID_SUPER;
+ }
fEmptyTypesViewer= new Label(fViewerbook, SWT.LEFT);
@@ -679,19 +666,19 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
// dropTarget.addDropListener(new TypeHierarchyTransferDropAdapter(this, fAllViewers[0]));
}
- private void addDropAdapters(AbstractTreeViewer viewer, int ops, Transfer[] transfers){
+// private void addDropAdapters(AbstractTreeViewer viewer, int ops, Transfer[] transfers){
// TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] {
// new TypeHierarchyTransferDropAdapter(this, viewer)
// };
// viewer.addDropSupport(ops, transfers, new DelegatingDropAdapter(dropListeners));
- }
+// }
- private void addDragAdapters(StructuredViewer viewer, int ops, Transfer[] transfers) {
+// private void addDragAdapters(StructuredViewer viewer, int ops, Transfer[] transfers) {
// TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
// new SelectionTransferDragAdapter(viewer)
// };
// viewer.addDragSupport(ops, transfers, new JdtViewerDragAdapter(viewer, dragListeners));
- }
+// }
/**
* Returns the inner component in a workbench part.
@@ -739,15 +726,14 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
fPagebook.showPage(fNoHierarchyShownLabel);
-// try {
-// fOrientation= fDialogSettings.getInt(DIALOGSTORE_VIEWORIENTATION);
-// if (fOrientation < 0 || fOrientation > 3) {
-// fOrientation= VIEW_ORIENTATION_VERTICAL;
-// }
-// } catch (NumberFormatException e) {
-// fOrientation= VIEW_ORIENTATION_AUTOMATIC;
-// }
- fOrientation= VIEW_ORIENTATION_AUTOMATIC;
+ try {
+ fOrientation= fDialogSettings.getInt(DIALOGSTORE_VIEWORIENTATION);
+ if (fOrientation < 0 || fOrientation > 3) {
+ fOrientation= VIEW_ORIENTATION_VERTICAL;
+ }
+ } catch (NumberFormatException e) {
+ fOrientation= VIEW_ORIENTATION_AUTOMATIC;
+ }
// force the update
fCurrentOrientation= -1;
@@ -814,7 +800,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
setViewerVisibility(false);
}
-// WorkbenchHelp.setHelp(fPagebook, ICHelpContextIds.TYPE_HIERARCHY_VIEW);
+ WorkbenchHelp.setHelp(fPagebook, ICHelpContextIds.TYPE_HIERARCHY_VIEW);
fActionGroups= new CompositeActionGroup(new ActionGroup[] {
@@ -899,9 +885,8 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
if (methodViewerNeedsUpdate) {
updateMethodViewer(fSelectedType);
}
-// fDialogSettings.put(DIALOGSTORE_VIEWORIENTATION, orientation);
+ fDialogSettings.put(DIALOGSTORE_VIEWORIENTATION, orientation);
fCurrentOrientation= orientation;
-
}
}
@@ -945,7 +930,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
/**
* Creates the context menu for the hierarchy viewers
*/
- private void fillTypesViewerContextMenu(TypeHierarchyViewer viewer, IMenuManager menu) {
+ protected void fillTypesViewerContextMenu(TypeHierarchyViewer viewer, IMenuManager menu) {
CUIPlugin.createStandardGroups(menu);
menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, new Separator(GROUP_FOCUS));
@@ -964,7 +949,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
/**
* Creates the context menu for the method viewer
*/
- private void fillMethodsViewerContextMenu(IMenuManager menu) {
+ protected void fillMethodsViewerContextMenu(IMenuManager menu) {
CUIPlugin.createStandardGroups(menu);
// viewer entries
fMethodsViewer.contributeToContextMenu(menu);
@@ -1000,8 +985,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
}
private ICElement getSelectableType(ICElement elem) {
-// if (elem.getElementType() != ICElement.TYPE) {
- if (!(elem instanceof IStructure)) {
+ if (!TypeUtil.isClassOrStruct(elem)) {
return getCurrentViewer().getTreeRootType();
} else {
return elem;
@@ -1022,7 +1006,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
* <code>updateHierarchyViewer<code> brings up the correct view and refreshes
* the current tree
*/
- private void updateHierarchyViewer(final boolean doExpand) {
+ protected void updateHierarchyViewer(final boolean doExpand) {
if (fInputElement == null) {
fNoHierarchyShownLabel.setText(TypeHierarchyMessages.getString("TypeHierarchyViewPart.empty")); //$NON-NLS-1$
fPagebook.showPage(fNoHierarchyShownLabel);
@@ -1189,19 +1173,15 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
title= viewerTitle;
tooltip= viewerTitle;
}
- setTitle(title);
+ setPartName(title);
+ setContentDescription(""); //$NON-NLS-1$
setTitleToolTip(tooltip);
}
private void updateToolbarButtons() {
- boolean isType= fInputElement instanceof ICElement;
for (int i= 0; i < fViewActions.length; i++) {
ToggleViewAction action= fViewActions[i];
-// if (action.getViewerIndex() == VIEW_ID_TYPE) {
-// action.setEnabled(fInputElement != null);
-// } else {
- action.setEnabled(isType);
-// }
+ action.setEnabled(true);
}
}
@@ -1227,7 +1207,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
}
updateTitle();
-// fDialogSettings.put(DIALOGSTORE_HIERARCHYVIEW, viewerIndex);
+ fDialogSettings.put(DIALOGSTORE_HIERARCHYVIEW, viewerIndex);
getCurrentViewer().getTree().setFocus();
}
for (int i= 0; i < fViewActions.length; i++) {
@@ -1372,37 +1352,37 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
* @see ViewPart#saveState(IMemento)
*/
public void saveState(IMemento memento) {
-// if (fPagebook == null) {
-// // part has not been created
-// if (fMemento != null) { //Keep the old state;
-// memento.putMemento(fMemento);
-// }
-// return;
-// }
+ if (fPagebook == null) {
+ // part has not been created
+ if (fMemento != null) { //Keep the old state;
+ memento.putMemento(fMemento);
+ }
+ return;
+ }
// if (fInputElement != null) {
// String handleIndentifier= fInputElement.getHandleIdentifier();
// memento.putString(TAG_INPUT, handleIndentifier);
// }
-// memento.putInteger(TAG_VIEW, getViewIndex());
-// memento.putInteger(TAG_ORIENTATION, fOrientation);
-// int weigths[]= fTypeMethodsSplitter.getWeights();
-// int ratio= (weigths[0] * 1000) / (weigths[0] + weigths[1]);
-// memento.putInteger(TAG_RATIO, ratio);
-//
-// ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
-// int position= bar != null ? bar.getSelection() : 0;
-// memento.putInteger(TAG_VERTICAL_SCROLL, position);
-//
+ memento.putInteger(TAG_VIEW, getViewIndex());
+ memento.putInteger(TAG_ORIENTATION, fOrientation);
+ int weigths[]= fTypeMethodsSplitter.getWeights();
+ int ratio= (weigths[0] * 1000) / (weigths[0] + weigths[1]);
+ memento.putInteger(TAG_RATIO, ratio);
+
+ ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
+ int position= bar != null ? bar.getSelection() : 0;
+ memento.putInteger(TAG_VERTICAL_SCROLL, position);
+
// ICElement selection= (ICElement)((IStructuredSelection) getCurrentViewer().getSelection()).getFirstElement();
// if (selection != null) {
// memento.putString(TAG_SELECTION, selection.getHandleIdentifier());
// }
-//
-// fWorkingSetActionGroup.saveState(memento);
-//
-// fMethodsViewer.saveState(memento);
-//
-// saveLinkingEnabled(memento);
+
+ fWorkingSetActionGroup.saveState(memento);
+
+ fMethodsViewer.saveState(memento);
+
+ saveLinkingEnabled(memento);
}
private void saveLinkingEnabled(IMemento memento) {
@@ -1414,9 +1394,9 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
*/
private void restoreState(final IMemento memento, ICElement defaultInput) {
ICElement input= defaultInput;
- String elementId= memento.getString(TAG_INPUT);
+// String elementId= memento.getString(TAG_INPUT);
// if (elementId != null) {
-// input= CCore.create(elementId);
+// input= CoreModel.create(elementId);
// if (input != null && !input.exists()) {
// input= null;
// }
@@ -1447,7 +1427,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
}
}
- private void doRestoreInBackground(final IMemento memento, final ICElement hierarchyInput, IProgressMonitor monitor) throws CModelException {
+ protected void doRestoreInBackground(final IMemento memento, final ICElement hierarchyInput, IProgressMonitor monitor) throws CModelException {
fHierarchyLifeCycle.doHierarchyRefresh(hierarchyInput, monitor);
if (!monitor.isCanceled()) {
Display.getDefault().asyncExec(new Runnable() {
@@ -1531,30 +1511,18 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
}
ICElement elem= (ICElement)editor.getEditorInput().getAdapter(ICElement.class);
-// try {
- TypeHierarchyViewer currentViewer= getCurrentViewer();
-// if (elem instanceof IClassFile) {
-// ICElement type= ((IClassFile)elem).getType();
-// if (currentViewer.isElementShown(type)) {
-// internalSelectType(type, true);
-// updateMethodViewer(type);
-// }
-// } else
- if (elem instanceof ITranslationUnit) {
-// ICElement[] allTypes= ((ITranslationUnit)elem).getAllTypes();
- ICElement[] allTypes= TypeUtil.getTypes((ITranslationUnit)elem);
- for (int i= 0; i < allTypes.length; i++) {
- if (currentViewer.isElementShown(allTypes[i])) {
- internalSelectType(allTypes[i], true);
- updateMethodViewer(allTypes[i]);
- return;
- }
+ TypeHierarchyViewer currentViewer= getCurrentViewer();
+ if (elem instanceof ITranslationUnit) {
+// ICElement[] allTypes= ((ITranslationUnit)elem).getAllTypes();
+ ICElement[] allTypes= TypeUtil.getTypes(elem);
+ for (int i= 0; i < allTypes.length; i++) {
+ if (currentViewer.isElementShown(allTypes[i])) {
+ internalSelectType(allTypes[i], true);
+ updateMethodViewer(allTypes[i]);
+ return;
}
- }
-// } catch (CModelException e) {
-// CUIPlugin.getDefault().log(e);
-// }
-
+ }
+ }
}
/* (non-Javadoc)
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewer.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewer.java
index 266f5d5f3e..58da456621 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewer.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/typehierarchy/TypeHierarchyViewer.java
@@ -10,27 +10,20 @@
*******************************************************************************/
package org.eclipse.cdt.internal.ui.browser.typehierarchy;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Tree;
-
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMember;
-import org.eclipse.cdt.internal.ui.ICHelpContextIds;
-import org.eclipse.cdt.internal.ui.browser.cbrowsing.DecoratingCLabelProvider;
import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer;
-import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
import org.eclipse.cdt.ui.CElementLabelProvider;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.ViewerFilter;
-
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java
index 5c3ca9ff68..307026dc96 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java
@@ -207,7 +207,7 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
private static final TypeInfoLabelProvider fElementRenderer = new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_TYPE_ONLY);
private static final TypeInfoLabelProvider fQualifierRenderer = new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_ENCLOSING_TYPE_ONLY + TypeInfoLabelProvider.SHOW_PATH);
- private static final TypeFilterMatcher fFilterMatcher = new TypeFilterMatcher();
+ static final TypeFilterMatcher fFilterMatcher = new TypeFilterMatcher();
private static final StringComparator fStringComparator = new StringComparator();
private static final int[] fAllTypes = { ICElement.C_NAMESPACE, ICElement.C_CLASS,
@@ -427,7 +427,7 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
/**
* Forces redraw of elements list.
*/
- private void updateElements() {
+ void updateElements() {
fNewFilteredList.setFilter(fTextWidget.getText());
}
diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml
index 0dc341103c..294961d000 100644
--- a/core/org.eclipse.cdt.ui/plugin.xml
+++ b/core/org.eclipse.cdt.ui/plugin.xml
@@ -174,7 +174,7 @@
<perspective
name="%CHierarchy.perspective.name"
icon="icons/full/eview16/chierch_persp.gif"
- class="org.eclipse.cdt.internal.ui.CHierarchyPerspectiveFactory"
+ class="org.eclipse.cdt.internal.ui.browser.typehierarchy.CHierarchyPerspectiveFactory"
id="org.eclipse.cdt.ui.CHierarchyPerspective">
</perspective>
</extension>
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java
index f9965047fd..efca3a2d2c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java
@@ -134,6 +134,7 @@ public interface ICHelpContextIds {
public static final String SORT_BY_DEFINING_TYPE_ACTION = PREFIX + "sort_by_defining_type_action"; //$NON-NLS-1$
public static final String SHOW_QUALIFIED_NAMES_ACTION = PREFIX + "show_qualified_names_action"; //$NON-NLS-1$
+ public static final String ENABLE_METHODFILTER_ACTION = PREFIX + "enable_methodfilter_action"; //$NON-NLS-1$
public static final String LEXICAL_SORTING_BROWSING_ACTION = PREFIX + "lexical_sorting_browsing_action"; //$NON-NLS-1$

Back to the top