This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

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

(-)debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml (+9 lines)
Lines 20-25 Link Here
20
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
20
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
21
21
22
<filesystem>
22
<filesystem>
23
    <!-- Mark Java sources as debuggable -->
24
    <folder name="Debugging">
25
        <folder name="Breakpoints">
26
            <folder name="text">
27
                <folder name="x-java" />
28
            </folder>
29
        </folder>
30
    </folder>
31
23
    <folder name="Editors">
32
    <folder name="Editors">
24
        <folder name="text">
33
        <folder name="text">
25
            <folder name="x-java">
34
            <folder name="x-java">
(-)debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/ToggleBreakpointActionProvider.java (-6 / +10 lines)
Lines 37-42 Link Here
37
import org.netbeans.modules.debugger.jpda.ui.breakpoints.BreakpointAnnotationListener;
37
import org.netbeans.modules.debugger.jpda.ui.breakpoints.BreakpointAnnotationListener;
38
import org.netbeans.spi.debugger.ActionsProviderSupport;
38
import org.netbeans.spi.debugger.ActionsProviderSupport;
39
import org.openide.filesystems.FileObject;
39
import org.openide.filesystems.FileObject;
40
import org.openide.filesystems.Repository;
40
import org.openide.filesystems.URLMapper;
41
import org.openide.filesystems.URLMapper;
41
42
42
import org.openide.util.NbBundle;
43
import org.openide.util.NbBundle;
Lines 76-87 Link Here
76
        } catch (MalformedURLException muex) {
77
        } catch (MalformedURLException muex) {
77
            fo = null;
78
            fo = null;
78
        }
79
        }
79
        setEnabled (
80
80
            ActionsManager.ACTION_TOGGLE_BREAKPOINT,
81
        // Take a look in the System File System and see if anybody has registered debuggability
81
            (EditorContextBridge.getCurrentLineNumber () >= 0) && 
82
        // for this MIME type
82
            (fo != null && "text/x-java".equals(fo.getMIMEType()))  // NOI18N
83
        boolean isDebuggableFile = fo != null && Repository.getDefault().getDefaultFileSystem().
83
            //(EditorContextBridge.getCurrentURL ().endsWith (".java"))
84
                findResource("Debugging/Breakpoints/" + fo.getMIMEType()) != null; // NOI18N
84
        );
85
        //OLD: boolean isDebuggableFile = (fo != null && "text/x-java".equals(fo.getMIMEType())); // NOI18N        
86
87
        setEnabled(ActionsManager.ACTION_TOGGLE_BREAKPOINT,
88
                   isDebuggableFile && (EditorContextBridge.getCurrentLineNumber () >= 0));
85
        if ( debugger != null && 
89
        if ( debugger != null && 
86
             debugger.getState () == debugger.STATE_DISCONNECTED
90
             debugger.getState () == debugger.STATE_DISCONNECTED
87
        ) 
91
        ) 

Return to bug 74317