View | Details | Raw Unified | Return to bug 441247
Collapse All | Expand All

(-)a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java (-3 / +32 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
2
 * Copyright (c) 2000, 2014 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 24-35 Link Here
24
import org.eclipse.jdt.debug.core.IJavaBreakpoint;
24
import org.eclipse.jdt.debug.core.IJavaBreakpoint;
25
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
25
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
26
import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
26
import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
27
import org.eclipse.jdt.debug.core.IJavaStratumLineBreakpoint;
27
import org.eclipse.jdt.debug.core.IJavaWatchpoint;
28
import org.eclipse.jdt.debug.core.IJavaWatchpoint;
28
import org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor;
29
import org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor;
29
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaClassPrepareBreakpoint;
30
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaClassPrepareBreakpoint;
30
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaExceptionBreakpoint;
31
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaExceptionBreakpoint;
31
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint;
32
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint;
32
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaMethodBreakpoint;
33
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaMethodBreakpoint;
34
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaStratumLineBreakpoint;
33
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaWatchpoint;
35
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaWatchpoint;
34
import org.eclipse.jdt.internal.debug.ui.BreakpointUtils;
36
import org.eclipse.jdt.internal.debug.ui.BreakpointUtils;
35
import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
37
import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
Lines 221-231 Link Here
221
	protected void createLabels(Composite parent) {
223
	protected void createLabels(Composite parent) {
222
		Composite labelComposite = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
224
		Composite labelComposite = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
223
		try {
225
		try {
224
			String typeName = ((IJavaBreakpoint) getElement()).getTypeName();
226
			IJavaBreakpoint bp = (IJavaBreakpoint) getElement();
227
			String typeName = bp.getTypeName();
225
			if (typeName != null) {
228
			if (typeName != null) {
226
				createLabel(labelComposite, PropertyPageMessages.JavaBreakpointPage_3); 
229
				createLabel(labelComposite, PropertyPageMessages.JavaBreakpointPage_3); 
227
				Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, typeName);
230
				Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, typeName);
228
				text.setBackground(parent.getBackground());
231
				text.setBackground(parent.getBackground());
232
			}
233
			if (bp instanceof IJavaStratumLineBreakpoint) {
234
				JavaStratumLineBreakpoint sbp = (JavaStratumLineBreakpoint) bp;
235
				String value = sbp.getSourceName();
236
				if (value != null) {
237
					createLabel(labelComposite, "Sour&ce:");
238
					Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, value);
239
					text.setBackground(parent.getBackground());
240
				}
241
				value = sbp.getPattern();
242
				if (value != null) {
243
					createLabel(labelComposite, "&Pattern:");
244
					Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, value);
245
					text.setBackground(parent.getBackground());
246
				}
247
				value = sbp.getStratum();
248
				if (value != null) {
249
					createLabel(labelComposite, "Strat&um:");
250
					Text text = SWTFactory.createText(labelComposite, SWT.READ_ONLY, 1, value);
251
					text.setBackground(parent.getBackground());
252
				}
229
			}
253
			}
230
			createTypeSpecificLabels(labelComposite);
254
			createTypeSpecificLabels(labelComposite);
231
		} catch (CoreException ce) {
255
		} catch (CoreException ce) {
Lines 324-329 Link Here
324
			setTitle(PropertyPageMessages.JavaLineBreakpointPage_20);
348
			setTitle(PropertyPageMessages.JavaLineBreakpointPage_20);
325
			fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] 
349
			fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] 
326
			    {new MethodBreakpointEditor(), new JavaBreakpointConditionEditor(null)});
350
			    {new MethodBreakpointEditor(), new JavaBreakpointConditionEditor(null)});
351
			} else if (JavaStratumLineBreakpoint.STRATUM_BREAKPOINT.equals(type)) {
352
				setTitle("Stratum Line Breakpoint");
353
				fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] { new StandardJavaBreakpointEditor(),
354
						new JavaBreakpointConditionEditor() });
327
		} else {
355
		} else {
328
			// use standard editor for any other kind of breakpoint (@see bug 325161)
356
			// use standard editor for any other kind of breakpoint (@see bug 325161)
329
			fEditor = new StandardJavaBreakpointEditor();
357
			fEditor = new StandardJavaBreakpointEditor();
Lines 391-397 Link Here
391
	
419
	
392
	/**
420
	/**
393
	 * Check to see if the breakpoint should be deleted.
421
	 * Check to see if the breakpoint should be deleted.
394
	 * @return <code>true</code> if the page was canceled, <code>false</code> othewise
422
	 * 
423
	 * @return <code>true</code> if the page was canceled, <code>false</code> otherwise
395
	 */
424
	 */
396
	@Override
425
	@Override
397
	public boolean performCancel() {
426
	public boolean performCancel() {
(-)a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java (-6 / +10 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 *  Copyright (c) 2003, 2012 IBM Corporation and others.
2
 *  Copyright (c) 2003, 2014 IBM Corporation and others.
3
 *  All rights reserved. This program and the accompanying materials
3
 *  All rights reserved. This program and the accompanying materials
4
 *  are made available under the terms of the Eclipse Public License v1.0
4
 *  are made available under the terms of the Eclipse Public License v1.0
5
 *  which accompanies this distribution, and is available at
5
 *  which accompanies this distribution, and is available at
Lines 46-52 Link Here
46
	private static final String PATTERN = "org.eclipse.jdt.debug.pattern"; //$NON-NLS-1$
46
	private static final String PATTERN = "org.eclipse.jdt.debug.pattern"; //$NON-NLS-1$
47
	protected static final String STRATUM = "org.eclipse.jdt.debug.stratum"; //$NON-NLS-1$
47
	protected static final String STRATUM = "org.eclipse.jdt.debug.stratum"; //$NON-NLS-1$
48
	protected static final String SOURCE_PATH = "org.eclipse.jdt.debug.source_path"; //$NON-NLS-1$
48
	protected static final String SOURCE_PATH = "org.eclipse.jdt.debug.source_path"; //$NON-NLS-1$
49
	private static final String STRATUM_BREAKPOINT = "org.eclipse.jdt.debug.javaStratumLineBreakpointMarker"; //$NON-NLS-1$
49
	public static final String STRATUM_BREAKPOINT = "org.eclipse.jdt.debug.javaStratumLineBreakpointMarker"; //$NON-NLS-1$
50
	private String[] fTypeNamePatterns;
50
	private String[] fTypeNamePatterns;
51
	// corresponds to type name patterns with beginning/trailing '*' removed
51
	// corresponds to type name patterns with beginning/trailing '*' removed
52
	private String[] fSuffix;
52
	private String[] fSuffix;
Lines 264-277 Link Here
264
				if (fSuffix[i].length() == 0) {
264
				if (fSuffix[i].length() == 0) {
265
					return true;
265
					return true;
266
				}
266
				}
267
				if (typeName.endsWith(fSuffix[i]))
267
				if (typeName.endsWith(fSuffix[i])) {
268
					return true;
268
					return true;
269
				}
269
			} else if (fPrefix[i] != null) {
270
			} else if (fPrefix[i] != null) {
270
				if (typeName.startsWith(fPrefix[i]))
271
				if (typeName.startsWith(fPrefix[i])) {
271
					return true;
272
					return true;
273
				}
272
			} else {
274
			} else {
273
				if (typeName.startsWith(patterns[i]))
275
				if (typeName.startsWith(patterns[i])) {
274
					return true;
276
					return true;
277
				}
275
			}
278
			}
276
		}
279
		}
277
280
Lines 433-440 Link Here
433
	}
436
	}
434
437
435
	public synchronized String[] getTypeNamePatterns() throws CoreException {
438
	public synchronized String[] getTypeNamePatterns() throws CoreException {
436
		if (fTypeNamePatterns != null)
439
		if (fTypeNamePatterns != null) {
437
			return fTypeNamePatterns;
440
			return fTypeNamePatterns;
441
		}
438
442
439
		String patterns = getPattern();
443
		String patterns = getPattern();
440
444

Return to bug 441247