From f8bf3ae0d039ec8026772970e11ed2a4d401fddc Mon Sep 17 00:00:00 2001
From: incastrix <incastrix>
Date: Wed, 7 Oct 2009 17:04:04 +0000
Subject: [PATCH 1/1] Refactory: remove dependance to org.eclipse.debug.ui from net.sourceforge.phpeclipse.ui

---
 net.sourceforge.phpeclipse.debug.ui/plugin.xml     |    9 +++
 .../phpdt/debug/ui/BreakpointImageProvider.java    |   64 ++++++++++++++++++++
 net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF |    4 +-
 net.sourceforge.phpeclipse.ui/plugin.xml           |    5 --
 .../phpeditor/BreakpointImageProvider.java         |   64 --------------------
 5 files changed, 75 insertions(+), 71 deletions(-)
 create mode 100644 net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/debug/ui/BreakpointImageProvider.java
 delete mode 100644 net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/BreakpointImageProvider.java

diff --git a/net.sourceforge.phpeclipse.debug.ui/plugin.xml b/net.sourceforge.phpeclipse.debug.ui/plugin.xml
index a81cb4f..5c62bd7 100644
--- a/net.sourceforge.phpeclipse.debug.ui/plugin.xml
+++ b/net.sourceforge.phpeclipse.debug.ui/plugin.xml
@@ -2,6 +2,15 @@
 <?eclipse version="3.2"?>
 <plugin>
    <extension
+		 point="org.eclipse.ui.editors.markerAnnotationSpecification">
+	  <specification
+			annotationType="org.eclipse.debug.core.breakpoint"
+			icon="icons/full/obj16/brkp_obj.gif"
+			annotationImageProvider="net.sourceforge.phpdt.debug.ui.BreakpointImageProvider">
+	  </specification>
+   </extension>
+
+   <extension
          point="org.eclipse.ui.preferencePages">
       <page
             name="%PreferencePage.PHPInterpreter.name"
diff --git a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/debug/ui/BreakpointImageProvider.java b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/debug/ui/BreakpointImageProvider.java
new file mode 100644
index 0000000..b5dbaab
--- /dev/null
+++ b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/debug/ui/BreakpointImageProvider.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 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 net.sourceforge.phpdt.debug.ui;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.texteditor.IAnnotationImageProvider;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+
+/**
+ * BreakpointImageProvider
+ * 
+ * @since 3.0
+ */
+public class BreakpointImageProvider implements IAnnotationImageProvider {
+
+	private IDebugModelPresentation fPresentation;
+
+	/*
+	 * @see org.eclipse.jface.text.source.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation)
+	 */
+	public Image getManagedImage(Annotation annotation) {
+		if (annotation instanceof MarkerAnnotation) {
+			MarkerAnnotation markerAnnotation = (MarkerAnnotation) annotation;
+			IMarker marker = markerAnnotation.getMarker();
+			if (marker != null && marker.exists())
+				return getPresentation().getImage(marker);
+		}
+
+		return null;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.source.IAnnotationImageProvider#getImageDescriptorId(org.eclipse.jface.text.source.Annotation)
+	 */
+	public String getImageDescriptorId(Annotation annotation) {
+		return null;
+	}
+
+	/*
+	 * @see org.eclipse.jface.text.source.IAnnotationImageProvider#getImageDescriptor(java.lang.String)
+	 */
+	public ImageDescriptor getImageDescriptor(String imageDescritporId) {
+		return null;
+	}
+
+	private IDebugModelPresentation getPresentation() {
+		if (fPresentation == null)
+			fPresentation = DebugUITools.newDebugModelPresentation();
+		return fPresentation;
+	}
+}
diff --git a/net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF b/net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF
index 4a6ee87..9cdcc1d 100644
--- a/net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF
+++ b/net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF
@@ -79,11 +79,11 @@ Require-Bundle: net.sourceforge.phpeclipse.core,
  net.sourceforge.phpeclipse.webbrowser,
  net.sourceforge.phpeclipse;bundle-version="0.0.0",
  org.eclipse.team.core,
- org.eclipse.debug.ui,
  org.eclipse.search,
  org.eclipse.ui.console,
  net.sourceforge.phpeclipse.xml.core,
- org.eclipse.compare
+ org.eclipse.compare,
+ org.eclipse.core.resources;bundle-version="3.4.1"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-ActivationPolicy: lazy
 Import-Package: org.eclipse.ltk.core.refactoring.participants,
diff --git a/net.sourceforge.phpeclipse.ui/plugin.xml b/net.sourceforge.phpeclipse.ui/plugin.xml
index 36732b0..90e8b17 100644
--- a/net.sourceforge.phpeclipse.ui/plugin.xml
+++ b/net.sourceforge.phpeclipse.ui/plugin.xml
@@ -941,11 +941,6 @@
 			annotationImageProvider="net.sourceforge.phpeclipse.phpeditor.JavaAnnotationImageProvider">
 	  </specification>
 	  <specification
-			annotationType="org.eclipse.debug.core.breakpoint"
-			icon="icons/full/obj16/brkp_obj.gif"
-			annotationImageProvider="net.sourceforge.phpeclipse.phpeditor.BreakpointImageProvider">
-	  </specification>
-	  <specification
 			annotationType="net.sourceforge.phpdt.ui.occurrences"
 			label="%OccurrenceAnnotation.label"
 			icon="icons/obj16/searchm_obj.gif"
diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/BreakpointImageProvider.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/BreakpointImageProvider.java
deleted file mode 100644
index b57d14d..0000000
--- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/BreakpointImageProvider.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 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 net.sourceforge.phpeclipse.phpeditor;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.texteditor.IAnnotationImageProvider;
-import org.eclipse.ui.texteditor.MarkerAnnotation;
-
-/**
- * BreakpointImageProvider
- * 
- * @since 3.0
- */
-public class BreakpointImageProvider implements IAnnotationImageProvider {
-
-	private IDebugModelPresentation fPresentation;
-
-	/*
-	 * @see org.eclipse.jface.text.source.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation)
-	 */
-	public Image getManagedImage(Annotation annotation) {
-		if (annotation instanceof MarkerAnnotation) {
-			MarkerAnnotation markerAnnotation = (MarkerAnnotation) annotation;
-			IMarker marker = markerAnnotation.getMarker();
-			if (marker != null && marker.exists())
-				return getPresentation().getImage(marker);
-		}
-
-		return null;
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.source.IAnnotationImageProvider#getImageDescriptorId(org.eclipse.jface.text.source.Annotation)
-	 */
-	public String getImageDescriptorId(Annotation annotation) {
-		return null;
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.source.IAnnotationImageProvider#getImageDescriptor(java.lang.String)
-	 */
-	public ImageDescriptor getImageDescriptor(String imageDescritporId) {
-		return null;
-	}
-
-	private IDebugModelPresentation getPresentation() {
-		if (fPresentation == null)
-			fPresentation = DebugUITools.newDebugModelPresentation();
-		return fPresentation;
-	}
-}
-- 
1.7.1