Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Framework for breakpoint in disassembly

Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/ChangeLog,v
retrieving revision 1.46
diff -u -r1.46 ChangeLog
--- ChangeLog	13 Dec 2002 04:13:47 -0000	1.46
+++ ChangeLog	2 Jan 2003 21:43:30 -0000
@@ -1,3 +1,9 @@
+2003-01-02 Alain Magloire
+
+	* src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java(createAnnotationModel):
+	Check for IStorageEditorInput and use the getAdapter() to find a resource for the
+	annotation model.
+
 2002-12-12 Judy N Green
 	*src/org/eclipse/cdt/internal/ui/editor/CEditor.java
 	Fixed Bugzilla bug PR 25176
Index: src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java,v
retrieving revision 1.7
diff -u -r1.7 CDocumentProvider.java
--- src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java	29 Oct 2002 21:40:58 -0000	1.7
+++ src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java	2 Jan 2003 21:43:30 -0000
@@ -6,6 +6,7 @@
  */
 
 import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IStorage;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.text.AbstractDocument;
@@ -91,6 +92,13 @@
 		if (element instanceof IFileEditorInput) {
 			IFileEditorInput input= (IFileEditorInput) element;
 			return new CMarkerAnnotationModel(input.getFile());
+		} else if (element instanceof IStorageEditorInput) {
+			// Fall back on the adapter.
+			IStorageEditorInput input = (IStorageEditorInput) element;
+			IResource res = (IResource)input.getAdapter(IResource.class);
+			if (res != null && res.exists()) {
+				return new CMarkerAnnotationModel(res);
+			}
 		}
 		
 		return super.createAnnotationModel(element);



Back to the top