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 |
) |