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 246313 Details for
Bug 441247
Conditional stratum line breakpoints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
POC patch
eclipse.jdt.debug.stratum.bp.patch (text/plain), 6.54 KB, created by
Michael Rennie
on 2014-08-25 09:40:36 EDT
(
hide
)
Description:
POC patch
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2014-08-25 09:40:36 EDT
Size:
6.54 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java >index 41d317e..9656425 100644 >--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java >+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2012 IBM Corporation and others. >+ * Copyright (c) 2000, 2014 IBM Corporation 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 >@@ -24,12 +24,14 @@ > import org.eclipse.jdt.debug.core.IJavaBreakpoint; > import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; > import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint; >+import org.eclipse.jdt.debug.core.IJavaStratumLineBreakpoint; > import org.eclipse.jdt.debug.core.IJavaWatchpoint; > import org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor; > import org.eclipse.jdt.internal.debug.core.breakpoints.JavaClassPrepareBreakpoint; > import org.eclipse.jdt.internal.debug.core.breakpoints.JavaExceptionBreakpoint; > import org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint; > import org.eclipse.jdt.internal.debug.core.breakpoints.JavaMethodBreakpoint; >+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaStratumLineBreakpoint; > import org.eclipse.jdt.internal.debug.core.breakpoints.JavaWatchpoint; > import org.eclipse.jdt.internal.debug.ui.BreakpointUtils; > import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds; >@@ -221,11 +223,33 @@ > protected void createLabels(Composite parent) { > Composite labelComposite = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0); > try { >- String typeName = ((IJavaBreakpoint) getElement()).getTypeName(); >+ IJavaBreakpoint bp = (IJavaBreakpoint) getElement(); >+ String typeName = bp.getTypeName(); > if (typeName != null) { > createLabel(labelComposite, PropertyPageMessages.JavaBreakpointPage_3); > Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, typeName); > text.setBackground(parent.getBackground()); >+ } >+ if (bp instanceof IJavaStratumLineBreakpoint) { >+ JavaStratumLineBreakpoint sbp = (JavaStratumLineBreakpoint) bp; >+ String value = sbp.getSourceName(); >+ if (value != null) { >+ createLabel(labelComposite, "Sour&ce:"); >+ Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, value); >+ text.setBackground(parent.getBackground()); >+ } >+ value = sbp.getPattern(); >+ if (value != null) { >+ createLabel(labelComposite, "&Pattern:"); >+ Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, value); >+ text.setBackground(parent.getBackground()); >+ } >+ value = sbp.getStratum(); >+ if (value != null) { >+ createLabel(labelComposite, "Strat&um:"); >+ Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, value); >+ text.setBackground(parent.getBackground()); >+ } > } > createTypeSpecificLabels(labelComposite); > } catch (CoreException ce) { >@@ -324,6 +348,10 @@ > setTitle(PropertyPageMessages.JavaLineBreakpointPage_20); > fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] > {new MethodBreakpointEditor(), new JavaBreakpointConditionEditor(null)}); >+ } else if (JavaStratumLineBreakpoint.STRATUM_BREAKPOINT.equals(type)) { >+ setTitle("Stratum Line Breakpoint"); >+ fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] { new StandardJavaBreakpointEditor(), >+ new JavaBreakpointConditionEditor() }); > } else { > // use standard editor for any other kind of breakpoint (@see bug 325161) > fEditor = new StandardJavaBreakpointEditor(); >@@ -391,7 +419,8 @@ > > /** > * Check to see if the breakpoint should be deleted. >- * @return <code>true</code> if the page was canceled, <code>false</code> othewise >+ * >+ * @return <code>true</code> if the page was canceled, <code>false</code> otherwise > */ > @Override > public boolean performCancel() { >diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java >index e5e8e90..9bc9976 100644 >--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java >+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2003, 2012 IBM Corporation and others. >+ * Copyright (c) 2003, 2014 IBM Corporation 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 >@@ -46,7 +46,7 @@ > private static final String PATTERN = "org.eclipse.jdt.debug.pattern"; //$NON-NLS-1$ > protected static final String STRATUM = "org.eclipse.jdt.debug.stratum"; //$NON-NLS-1$ > protected static final String SOURCE_PATH = "org.eclipse.jdt.debug.source_path"; //$NON-NLS-1$ >- private static final String STRATUM_BREAKPOINT = "org.eclipse.jdt.debug.javaStratumLineBreakpointMarker"; //$NON-NLS-1$ >+ public static final String STRATUM_BREAKPOINT = "org.eclipse.jdt.debug.javaStratumLineBreakpointMarker"; //$NON-NLS-1$ > private String[] fTypeNamePatterns; > // corresponds to type name patterns with beginning/trailing '*' removed > private String[] fSuffix; >@@ -264,14 +264,17 @@ > if (fSuffix[i].length() == 0) { > return true; > } >- if (typeName.endsWith(fSuffix[i])) >+ if (typeName.endsWith(fSuffix[i])) { > return true; >+ } > } else if (fPrefix[i] != null) { >- if (typeName.startsWith(fPrefix[i])) >+ if (typeName.startsWith(fPrefix[i])) { > return true; >+ } > } else { >- if (typeName.startsWith(patterns[i])) >+ if (typeName.startsWith(patterns[i])) { > return true; >+ } > } > } > >@@ -433,8 +436,9 @@ > } > > public synchronized String[] getTypeNamePatterns() throws CoreException { >- if (fTypeNamePatterns != null) >+ if (fTypeNamePatterns != null) { > return fTypeNamePatterns; >+ } > > String patterns = getPattern(); >
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 441247
: 246313