Bug 513008 - Chromium remote debugger sets default breakpoint type on all text editors
Summary: Chromium remote debugger sets default breakpoint type on all text editors
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Victor Rubezhny CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-02 15:42 EST by Mark Leone CLA
Modified: 2017-03-02 15:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Leone CLA 2017-03-02 15:42:39 EST
When feature org.eclipse.wst.jsdt.chromium.debug.feature is included in an RCP app that also includes CDT and/or Photran (FORTRAN development toolkit), the default breakpoint type in all C/C++ and FORTRAN source files is the default type contributed by JSDT, which does nothing in a C/C++ or FORTRAN source file. Thus double-clicking in the ruler does not create a breakpoint as the user expects, unless they first right-click in the ruler and set the breakpoint type to one of the provided C/C++ breakpoint types.

This is apparently caused by an overly-broad enablement declaration in plugin.xml for the org.eclipse.wst.jsdt.chromium.debug.ui plug-in. Below is the enablement element for the org.eclipse.debug.ui.toggleBreakpointsTargetFactories extension point.

<enablement>
          <or>
             <!-- Applicable for any text editor (java code additionally checks extension) -->
             <instanceof value="org.eclipse.ui.texteditor.ITextEditor"/>
             <!-- or when our debug element is in context -->
             <with variable="debugContext">
                <iterate>
                  <test property="org.eclipse.debug.ui.getModelIdentifier"
                        value="org.eclipse.wst.jsdt.chromium.debug"/>
                </iterate>
             </with>
          </or>
</enablement>

Rather than being enabled on all text editors, it should be enabled only on Javascript editors, or applied selectively to appropriate editors in some other way. Since RCP is designed to be a loosely coupled tools integration framework, the presence of one tool should not override the default setting in another tool with a value that has no meaning to that tool. JSDT appears to be unnecessarily breaking the default behavior for C/C++ and FORTRAN development.