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 39451 Details for
Bug 138473
[breakpoints] BreakpointManager sometimes fails to send a breakpoint-changed notification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Hacked PDA example that marks BPs as planted - Presentation adds the "(Planted)" to label.
PDAModelPresentation.java (text/plain), 4.07 KB, created by
Pawel Piech
on 2006-04-25 15:17:17 EDT
(
hide
)
Description:
Hacked PDA example that marks BPs as planted - Presentation adds the "(Planted)" to label.
Filename:
MIME Type:
Creator:
Pawel Piech
Created:
2006-04-25 15:17:17 EDT
Size:
4.07 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 2004 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 > * Bjorn Freeman-Benson - initial API and implementation > *******************************************************************************/ >package org.eclipse.debug.examples.ui.pda.model; > >import java.text.MessageFormat; > >import org.eclipse.core.resources.IFile; >import org.eclipse.core.resources.IResource; >import org.eclipse.core.runtime.CoreException; >import org.eclipse.debug.core.DebugException; >import org.eclipse.debug.core.model.IBreakpoint; >import org.eclipse.debug.core.model.ILineBreakpoint; >import org.eclipse.debug.core.model.IValue; >import org.eclipse.debug.examples.core.pda.model.PDALineBreakpoint; >import org.eclipse.debug.internal.ui.DebugUIMessages; >import org.eclipse.debug.ui.IDebugModelPresentation; >import org.eclipse.debug.ui.IValueDetailListener; >import org.eclipse.jface.viewers.LabelProvider; >import org.eclipse.swt.graphics.Image; >import org.eclipse.ui.IEditorInput; >import org.eclipse.ui.part.FileEditorInput; > >/** > * Renders PDA debug elements > */ >public class PDAModelPresentation extends LabelProvider implements IDebugModelPresentation { > /* (non-Javadoc) > * @see org.eclipse.debug.ui.IDebugModelPresentation#setAttribute(java.lang.String, java.lang.Object) > */ > public void setAttribute(String attribute, Object value) { > } > /* (non-Javadoc) > * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object) > */ > public Image getImage(Object element) { > return null; > } > /* (non-Javadoc) > * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object) > */ > public String getText(Object element) { > if (element instanceof PDALineBreakpoint) { > PDALineBreakpoint pdaBp = (PDALineBreakpoint)element; > return getDefaultBreakpointText(pdaBp) + (pdaBp.isPlanted() ? " (Planted)" : ""); > } > return null; > } > > private String getDefaultBreakpointText(IBreakpoint breakpoint) { > IResource resource = breakpoint.getMarker().getResource(); > StringBuffer label = new StringBuffer(); > if (resource != null) { > label.append(resource.getName()); > } > if (breakpoint instanceof ILineBreakpoint) { > try { > int lineNumber = ((ILineBreakpoint)breakpoint).getLineNumber(); > label.append(MessageFormat.format(DebugUIMessages.DefaultLabelProvider_17, new String[]{Integer.toString(lineNumber)})); //$NON-NLS-1$ > } catch (CoreException e) { > } > } > return label.toString(); > } > > /* (non-Javadoc) > * @see org.eclipse.debug.ui.IDebugModelPresentation#computeDetail(org.eclipse.debug.core.model.IValue, org.eclipse.debug.ui.IValueDetailListener) > */ > public void computeDetail(IValue value, IValueDetailListener listener) { > String detail = ""; > try { > detail = value.getValueString(); > } catch (DebugException e) { > } > listener.detailComputed(value, detail); > } > /* (non-Javadoc) > * @see org.eclipse.debug.ui.ISourcePresentation#getEditorInput(java.lang.Object) > */ > public IEditorInput getEditorInput(Object element) { > if (element instanceof IFile) { > return new FileEditorInput((IFile)element); > } > if (element instanceof ILineBreakpoint) { > return new FileEditorInput((IFile)((ILineBreakpoint)element).getMarker().getResource()); > } > return null; > } > /* (non-Javadoc) > * @see org.eclipse.debug.ui.ISourcePresentation#getEditorId(org.eclipse.ui.IEditorInput, java.lang.Object) > */ > public String getEditorId(IEditorInput input, Object element) { > if (element instanceof IFile || element instanceof ILineBreakpoint) { > return "org.eclipse.ui.DefaultTextEditor"; > } > return null; > } >}
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 Raw
Actions:
View
Attachments on
bug 138473
:
39448
|
39449
|
39450
| 39451 |
39452
|
39453