Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 41850 Details for
Bug 139141
Breakpoint image in ruler not updated if breakpoint enablement is toggled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for org.eclipse.wst.sse.ui
sse-breakpoint-annotation.patch (text/plain), 8.34 KB, created by
Nitin Dahyabhai
on 2006-05-18 03:25:14 EDT
(
hide
)
Description:
patch for org.eclipse.wst.sse.ui
Filename:
MIME Type:
Creator:
Nitin Dahyabhai
Created:
2006-05-18 03:25:14 EDT
Size:
8.34 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.sse.ui >Index: src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/sse/plugins/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java,v >retrieving revision 1.3 >diff -u -r1.3 StructuredMarkerAnnotation.java >--- src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java 6 Oct 2005 14:55:55 -0000 1.3 >+++ src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java 18 May 2006 07:20:50 -0000 >@@ -15,9 +15,6 @@ > > import org.eclipse.core.resources.IMarker; > import org.eclipse.core.runtime.CoreException; >-import org.eclipse.debug.core.model.IBreakpoint; >-import org.eclipse.debug.ui.DebugUITools; >-import org.eclipse.debug.ui.IDebugModelPresentation; > import org.eclipse.jface.resource.JFaceResources; > import org.eclipse.jface.text.source.IAnnotationPresentation; > import org.eclipse.swt.SWT; >@@ -26,7 +23,6 @@ > import org.eclipse.ui.ISharedImages; > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.texteditor.MarkerAnnotation; >-import org.eclipse.ui.texteditor.MarkerUtilities; > import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation; > > >@@ -37,115 +33,93 @@ > * in the OverviewRuler > */ > public class StructuredMarkerAnnotation extends MarkerAnnotation implements IAnnotationPresentation { >- >- private IDebugModelPresentation fPresentation; >- //controls if icon should be painted gray >+ // controls if icon should be painted gray > private boolean fIsGrayed = false; > String fAnnotationType = null; > > StructuredMarkerAnnotation(IMarker marker) { > super(marker); >- initAnnotationType(); > } >- >+ > public final String getAnnotationType() { > return fAnnotationType; > } >- >+ > /** >- * Eventually will have to use IAnnotationPresentation & IAnnotationExtension >+ * Eventually will have to use IAnnotationPresentation & >+ * IAnnotationExtension >+ * > * @see org.eclipse.ui.texteditor.MarkerAnnotation#getImage(org.eclipse.swt.widgets.Display) > */ > protected Image getImage(Display display) { > Image image = null; >- if (fAnnotationType == TemporaryAnnotation.ANNOT_BREAKPOINT) { >- image = super.getImage(display); >- if (image == null) { >- IMarker marker = getMarker(); >- if (marker != null && marker.exists()) { >- image = fPresentation.getImage(getMarker()); >- } >- } >- } >- else if(fAnnotationType == TemporaryAnnotation.ANNOT_ERROR) { >+ if (fAnnotationType == TemporaryAnnotation.ANNOT_ERROR) { > image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); > } >- else if(fAnnotationType == TemporaryAnnotation.ANNOT_WARNING) { >+ else if (fAnnotationType == TemporaryAnnotation.ANNOT_WARNING) { > image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); > } >- else if(fAnnotationType == TemporaryAnnotation.ANNOT_INFO) { >+ else if (fAnnotationType == TemporaryAnnotation.ANNOT_INFO) { > image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK); > } >- >- if(image != null && isGrayed()) >+ >+ if (image != null && isGrayed()) > setImage(getGrayImage(display, image)); >- else >+ else > setImage(image); >- >+ > return super.getImage(display); > } > > private Image getGrayImage(Display display, Image image) { > if (image != null) { >- String key= Integer.toString(image.hashCode()); >+ String key = Integer.toString(image.hashCode()); > // make sure we cache the gray image > Image grayImage = JFaceResources.getImageRegistry().get(key); > if (grayImage == null) { >- grayImage= new Image(display, image, SWT.IMAGE_GRAY); >+ grayImage = new Image(display, image, SWT.IMAGE_GRAY); > JFaceResources.getImageRegistry().put(key, grayImage); > } >- image= grayImage; >+ image = grayImage; > } > return image; > } >- >+ > public final boolean isGrayed() { > return fIsGrayed; > } >- >+ > public final void setGrayed(boolean grayed) { > fIsGrayed = grayed; > } >- >+ > /** > * Initializes the annotation's icon representation and its drawing layer > * based upon the properties of the underlying marker. > */ > protected void initAnnotationType() { >- >- IMarker marker = getMarker(); >- if (MarkerUtilities.isMarkerType(marker, IBreakpoint.BREAKPOINT_MARKER)) { >- >- if (fPresentation == null) >- fPresentation = DebugUITools.newDebugModelPresentation(); > >- setImage(null); // see bug 32469 >- setLayer(4); >- //fImageType = BREAKPOINT_IMAGE; >- fAnnotationType = TemporaryAnnotation.ANNOT_BREAKPOINT; >- >- } else { >- >- fAnnotationType = TemporaryAnnotation.ANNOT_UNKNOWN; >- try { >- if (marker.isSubtypeOf(IMarker.PROBLEM)) { >- int severity = marker.getAttribute(IMarker.SEVERITY, -1); >- switch (severity) { >- case IMarker.SEVERITY_ERROR : >- fAnnotationType = TemporaryAnnotation.ANNOT_ERROR; >- break; >- case IMarker.SEVERITY_WARNING : >- fAnnotationType = TemporaryAnnotation.ANNOT_WARNING; >- break; >- case IMarker.SEVERITY_INFO : >- fAnnotationType = TemporaryAnnotation.ANNOT_INFO; >- break; >- } >+ IMarker marker = getMarker(); >+ fAnnotationType = TemporaryAnnotation.ANNOT_UNKNOWN; >+ try { >+ if (marker.isSubtypeOf(IMarker.PROBLEM)) { >+ int severity = marker.getAttribute(IMarker.SEVERITY, -1); >+ switch (severity) { >+ case IMarker.SEVERITY_ERROR : >+ fAnnotationType = TemporaryAnnotation.ANNOT_ERROR; >+ break; >+ case IMarker.SEVERITY_WARNING : >+ fAnnotationType = TemporaryAnnotation.ANNOT_WARNING; >+ break; >+ case IMarker.SEVERITY_INFO : >+ fAnnotationType = TemporaryAnnotation.ANNOT_INFO; >+ break; > } >- >- } catch (CoreException e) { >- Logger.logException(e); > } >+ >+ } >+ catch (CoreException e) { >+ Logger.logException(e); > } > } > } >Index: src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/sse/plugins/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java,v >retrieving revision 1.3 >diff -u -r1.3 StructuredResourceMarkerAnnotationModel.java >--- src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java 6 Oct 2005 14:55:55 -0000 1.3 >+++ src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java 18 May 2006 07:20:50 -0000 >@@ -15,7 +15,6 @@ > import org.eclipse.core.resources.IMarker; > import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.CoreException; >-import org.eclipse.debug.core.model.IBreakpoint; > import org.eclipse.jface.text.Position; > import org.eclipse.ui.texteditor.MarkerAnnotation; > import org.eclipse.ui.texteditor.MarkerUtilities; >@@ -59,7 +58,7 @@ > * a special marker annotation for those markers. Otherwise, use > * default. > */ >- if (MarkerUtilities.isMarkerType(marker, IBreakpoint.BREAKPOINT_MARKER) || (MarkerUtilities.isMarkerType(marker, IMarker.PROBLEM))) { >+ if (MarkerUtilities.isMarkerType(marker, IMarker.PROBLEM)) { > return new StructuredMarkerAnnotation(marker); > } > return super.createMarkerAnnotation(marker); >Index: src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/sse/plugins/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java,v >retrieving revision 1.8 >diff -u -r1.8 TemporaryAnnotation.java >--- src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java 6 Oct 2005 14:55:56 -0000 1.8 >+++ src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java 18 May 2006 07:20:50 -0000 >@@ -44,8 +44,6 @@ > public final static String ANNOT_UNKNOWN = Annotation.TYPE_UNKNOWN; > public final static String ANNOT_WARNING = "org.eclipse.wst.sse.ui.temp.warning"; //$NON-NLS-1$ > >- public final static String ANNOT_BREAKPOINT = "org.eclipse.wst.sse.ui.breakpoint"; //$NON-NLS-1$ >- > // copied from CompilationUnitDocumentProvider.ProblemAnnotation > //XXX: To be fully correct these constants should be non-static >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 139141
: 41850