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:
parent
ef4e5c166a
commit
b1afdc1ddd
2 changed files with 11 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -870,13 +870,11 @@ 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 ISourceReference) {
|
||||
if (obj instanceof ICElement) {
|
||||
EditorUtility.revealInEditor(part, (ICElement) obj);
|
||||
}
|
||||
|
@ -884,7 +882,6 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isActivePart() {
|
||||
return this == getSite().getPage().getActivePart();
|
||||
|
|
Loading…
Add table
Reference in a new issue