Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 352502 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.xml (-1 / +4 lines)
Lines 215-221 Link Here
215
      <factory
215
      <factory
216
            class="org.eclipse.debug.examples.ui.pda.breakpoints.PDAEditorAdapterFactory"
216
            class="org.eclipse.debug.examples.ui.pda.breakpoints.PDAEditorAdapterFactory"
217
            adaptableType="org.eclipse.debug.examples.ui.pda.editor.PDAEditor">
217
            adaptableType="org.eclipse.debug.examples.ui.pda.editor.PDAEditor">
218
			<adapter type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget"/>
219
<!--#ifdef ex7 -->
218
<!--#ifdef ex7 -->
220
<!--#else -->
219
<!--#else -->
221
			<adapter type="org.eclipse.debug.ui.actions.IRunToLineTarget"/>
220
			<adapter type="org.eclipse.debug.ui.actions.IRunToLineTarget"/>
Lines 333-338 Link Here
333
   </extension>   
332
   </extension>   
334
   <extension point="org.eclipse.debug.ui.toggleBreakpointsTargetFactories">
333
   <extension point="org.eclipse.debug.ui.toggleBreakpointsTargetFactories">
335
      <toggleTargetFactory
334
      <toggleTargetFactory
335
            id="org.eclipse.debug.examples.ui.pda.BadToggleFactory"
336
            class="org.eclipse.debug.examples.ui.pda.breakpoints.BadPDAToggleFactory">
337
      </toggleTargetFactory>
338
      <toggleTargetFactory
336
            id="org.eclipse.debug.examples.ui.pda.ToggleWatchpointsTargetFactory"
339
            id="org.eclipse.debug.examples.ui.pda.ToggleWatchpointsTargetFactory"
337
            class="org.eclipse.debug.examples.ui.pda.breakpoints.PDAToggleWatchpointsTargetFactory">
340
            class="org.eclipse.debug.examples.ui.pda.breakpoints.PDAToggleWatchpointsTargetFactory">
338
            <enablement>
341
            <enablement>
(-)src/org/eclipse/debug/examples/ui/pda/breakpoints/BadPDAToggleFactory.java (+59 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.examples.ui.pda.breakpoints;
12
13
import java.util.Collections;
14
import java.util.Map;
15
import java.util.Set;
16
import java.util.TreeMap;
17
import java.util.TreeSet;
18
19
import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
20
import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory;
21
import org.eclipse.jface.viewers.ISelection;
22
import org.eclipse.ui.IWorkbenchPart;
23
24
public class BadPDAToggleFactory implements IToggleBreakpointsTargetFactory {
25
26
    private static final String TOGGLE_BAD = "org.eclipse.debug.examples.ui.pda.bad";
27
    
28
    private static Set TOGGLE_BAD_TARGETS = new TreeSet();
29
    
30
    private Map fToggleWatchpointTargets = new TreeMap();
31
    
32
    static {
33
        TOGGLE_BAD_TARGETS.add(TOGGLE_BAD);
34
    }   
35
    
36
    public IToggleBreakpointsTarget createToggleTarget(String targetID) {
37
        return null;
38
    }
39
    
40
    public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
41
        return TOGGLE_BAD;
42
    }
43
44
    public Set getToggleTargets(IWorkbenchPart part, ISelection selection) {
45
        return Collections.EMPTY_SET;
46
    }
47
48
    public String getToggleTargetName(String targetID) {
49
        if (TOGGLE_BAD.equals(targetID)) {
50
            return "Bad Toggle Target";
51
        } else { 
52
            return null;
53
        }
54
    }
55
56
    public String getToggleTargetDescription(String targetID) {
57
        return getToggleTargetName(targetID);
58
    }
59
}

Return to bug 352502