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

2005-08-20 Alain Magloire

Fix for PR 106540: Link with editor did not work correctly for non C resources.
	* src/org/eclipse/cdt/internal/ui/cview/CView.java
This commit is contained in:
Alain Magloire 2005-08-21 03:01:41 +00:00
parent ef4e5c166a
commit b1afdc1ddd
2 changed files with 11 additions and 10 deletions

View file

@ -1,3 +1,7 @@
2005-08-20 Alain Magloire
Fix for PR 106540: Link with editor did not work correctly for non C resources.
* src/org/eclipse/cdt/internal/ui/cview/CView.java
2005-08-20 Alain Magloire 2005-08-20 Alain Magloire
Fix PR 86802 106911 87497 : Assembly editor fixes. Fix PR 86802 106911 87497 : Assembly editor fixes.
* src/org/eclipse/cdt/internal/ui/editor/asm/ASMEditorActionContributor.java * src/org/eclipse/cdt/internal/ui/editor/asm/ASMEditorActionContributor.java

View file

@ -870,16 +870,13 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha
} }
if (selection.size() == 1) { if (selection.size() == 1) {
Object obj = selection.getFirstElement(); Object obj = selection.getFirstElement();
if (obj instanceof ISourceReference) { IEditorPart part = EditorUtility.isOpenInEditor(obj);
ITranslationUnit tu = ((ISourceReference) obj).getTranslationUnit(); if (part != null) {
if (tu != null) { IWorkbenchPage page = getSite().getPage();
IEditorPart part = EditorUtility.isOpenInEditor(obj); page.bringToTop(part);
if (part != null) { if (obj instanceof ISourceReference) {
IWorkbenchPage page = getSite().getPage(); if (obj instanceof ICElement) {
page.bringToTop(part); EditorUtility.revealInEditor(part, (ICElement) obj);
if (obj instanceof ICElement) {
EditorUtility.revealInEditor(part, (ICElement) obj);
}
} }
} }
} }