[jbosstools-issues] [JBoss JIRA] (ERT-480) JSDT stops breakpoints from working in C/C++ editors when CDT is installed [EBZ#511114]

Ilya Buziuk (JIRA) issues at jboss.org
Wed Feb 1 09:09:00 EST 2017


     [ https://issues.jboss.org/browse/ERT-480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Buziuk updated ERT-480:
----------------------------
    Sprint: devex #127 February 2017


> JSDT stops breakpoints from working in C/C++ editors when CDT is installed [EBZ#511114]
> ---------------------------------------------------------------------------------------
>
>                 Key: ERT-480
>                 URL: https://issues.jboss.org/browse/ERT-480
>             Project: Eclipse Release Train
>          Issue Type: Task
>          Components: JSDT
>            Reporter: Friendly Jira Robot
>            Assignee: Victor Rubezhny
>              Labels: Debug, bzira
>
> If you install CDT into an Eclipse containing Webtools or vice-versa then breakpoints stop working out-of-the-box in C/C++ code editors.
> Reproduction steps:
> 1. Download JEE distribution: eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz
> 2. Add the Neon CDT update site: http://download.eclipse.org/tools/cdt/releases/9.2 and install all "Main" and "Optional" features
> 3. Create a new C project --> "Hello World ANSI C Project"
> 4. Try to add breakpoint anywhere in the C file editor: (CTRL+SHIFT+B or from the main menu)
> 5. Notice you can't add a C breakpoint
> Workaround:
> 1. Instead you have to switch breakpoint types by going to "Run" menu --> "Breakpoint Types" --> "C/C++ Breakpoints"
> 2. Breakpoints can now be added as normal and as expected
> I don't expect the default breakpoint type to be incorrect for C/C++ editors when I have JSDT installed. This only fails when CDT and JSDT are installed at the same time.
> Quick brain dump of my understanding of the problem so far:
> 1. There is a kind of JavaScript breakpoint adaptor factory registered by webtools JSDT that is too unrestricted in the kinds of editors to which it applies. It applies itself to all text editors, regardless of content and then at a later point checks the extension of the file open in the editor (this is at odds other implementations I've looked at, which register themselves for specific editor types.)
> 2. The Eclipse debugging framework may be a bit sloppy checking whether a breakpoint adaptor exists for a given adaptable -- from reading the code, the adaptor manager method that is used seems to only go as far as checking to see if there is an adaptor factory available instead actually attempting to get an adaptor from the factory. This is problematic because the factory available for all editors, but it only returns an adaptor conditionally on the extension of the open file. This may be misleading the "toggle breakpoint" action into thinking it can apply a JavaScript breakpoint when it actually can't.
> I will attach a patch that that restricts the problematic breakpoint adaptor factory to javascript editors. This fixes the problem for my use-case above.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbosstools-issues mailing list