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 219334 Details for
Bug 384460
Provide Breakpoint Serialization/Deserialization API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Decorator to add breakpoint paths to preview
decorator.patch (text/plain), 4.32 KB, created by
Sebastian Schmidt
on 2012-07-30 14:40:24 EDT
(
hide
)
Description:
Decorator to add breakpoint paths to preview
Filename:
MIME Type:
Creator:
Sebastian Schmidt
Created:
2012-07-30 14:40:24 EDT
Size:
4.32 KB
patch
obsolete
>From 143ceb878f46969ce69dbde38c17f5ce7e55dfdc Mon Sep 17 00:00:00 2001 >From: Sebastian Schmidt <sebastian.schmidt@tum.de> >Date: Mon, 30 Jul 2012 11:33:30 -0700 >Subject: [PATCH] added breakpoint decorator > >--- > .../breakpoints/BreakpointsPathDecorator.java | 43 ++++++++++++++++++++ > .../WizardImportBreakpointsSelectionPage.java | 5 +++ > 2 files changed, 48 insertions(+) > create mode 100644 org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointsPathDecorator.java > >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointsPathDecorator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointsPathDecorator.java >new file mode 100644 >index 0000000..7c86447 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointsPathDecorator.java >@@ -0,0 +1,43 @@ >+/******************************************************************************* >+ * Copyright (c) 2012 Sebastian Schmidt and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Sebastian Schmidt - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.debug.internal.ui.importexport.breakpoints; >+ >+import org.eclipse.core.resources.IMarker; >+import org.eclipse.debug.core.model.IBreakpoint; >+import org.eclipse.jface.viewers.BaseLabelProvider; >+import org.eclipse.jface.viewers.ILabelDecorator; >+import org.eclipse.swt.graphics.Image; >+ >+/** >+ * A decorator which attaches the node path of breakpoints. >+ */ >+public class BreakpointsPathDecorator extends BaseLabelProvider implements ILabelDecorator { >+ >+ public Image decorateImage(Image image, Object element) { >+ return null; >+ } >+ >+ public String decorateText(String text, Object element) { >+ if (element instanceof IBreakpoint) { >+ IBreakpoint breakpoint = (IBreakpoint) element; >+ IMarker marker = breakpoint.getMarker(); >+ if (marker == null) { >+ return null; >+ } >+ String path = marker.getAttribute(IImportExportConstants.IE_NODE_PATH, null); >+ if (path != null && path.length() > 0) { >+ return text + " [" + path + "]"; //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ } >+ >+ return null; >+ } >+} >\ No newline at end of file >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java >index 4117142..cf873f2 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java >@@ -22,9 +22,12 @@ import org.eclipse.debug.internal.ui.SWTFactory; > import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; > import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta; > import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer; >+import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsViewer; > import org.eclipse.debug.ui.DebugUITools; > import org.eclipse.debug.ui.actions.ImportBreakpointsOperation; > import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.viewers.DecoratingLabelProvider; >+import org.eclipse.jface.viewers.ILabelProvider; > import org.eclipse.jface.wizard.WizardPage; > import org.eclipse.swt.graphics.Image; > import org.eclipse.swt.layout.GridData; >@@ -53,6 +56,8 @@ public class WizardImportBreakpointsSelectionPage extends WizardPage { > SWTFactory.createLabel(composite, ImportExportMessages.WizardExportBreakpointsPage_2, 1); > BreakpointManager breakpointManager = new BreakpointManager(); > fTView = new EmbeddedBreakpointsViewer(composite, breakpointManager, null); >+ BreakpointsViewer viewer = fTView.getViewer(); >+ viewer.setLabelProvider(new DecoratingLabelProvider((ILabelProvider) viewer.getLabelProvider(), new BreakpointsPathDecorator())); > setControl(composite); > } > >-- >1.7.9.5 >
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 384460
:
219020
|
219021
|
219062
|
219067
| 219334