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
Fix PR 86802 106911 87497 : Assembly editor fixes.
* 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) {
Object obj = selection.getFirstElement();
if (obj instanceof ISourceReference) {
ITranslationUnit tu = ((ISourceReference) obj).getTranslationUnit();
if (tu != null) {
IEditorPart part = EditorUtility.isOpenInEditor(obj);
if (part != null) {
IWorkbenchPage page = getSite().getPage();
page.bringToTop(part);
if (obj instanceof ICElement) {
EditorUtility.revealInEditor(part, (ICElement) obj);
}
IEditorPart part = EditorUtility.isOpenInEditor(obj);
if (part != null) {
IWorkbenchPage page = getSite().getPage();
page.bringToTop(part);
if (obj instanceof ISourceReference) {
if (obj instanceof ICElement) {
EditorUtility.revealInEditor(part, (ICElement) obj);
}
}
}