eclipse-pdt / pdt

PHP Development Tools project (PDT)
https://eclipse.org/pdt
Eclipse Public License 2.0
188 stars 46 forks source link

.inc files do not open in PHP Editor #237

Closed AntonVomFriedabach closed 1 year ago

AntonVomFriedabach commented 1 year ago

Describe the bug

Unexpected IDocument implementation: org.eclipse.core.internal.filebuffers.SynchronizableDocument Unexpected IDocumentProvider implementation: org.eclipse.dltk.internal.ui.editor.SourceModuleDocumentProvider StructuredTextEditor being used without StructuredDocument Input Name: actions.inc <- The file I wanted to open

Describe the eclipse environment Eclipse 2023-06 PDT 8.0 No plugins installed

Describe your system

To Reproduce Steps to reproduce the behavior:

  1. From your project, try to open .inc file
  2. Observe it opens in Text Editor, not PHP Editor
  3. Try "Open With" and select "PHP Editor"
  4. Observe message "Unsupported Content Type in Editor"

Expected behavior .inc file should open in PHP Editor just like regular PHP files

Screenshots Select open with: image Error message: image File looks like this (it has proper <?php tags) image Content Types settings look like this (you can see the .module file association I've created myself, which works (see below) - .inc doesn't work even though listed and locked): image

Additional context Regular .php files open in PHP Editor as expected. I also have some .module files that are PHP files, for which I've selected "Use it for all .module files" in the "Open With" => PHP Editor dialog. They open in PHP Editor as expected, syntax highlighting working as expected.

zulus commented 1 year ago

Good catch! Looks like conflict with C++ extension from TM terminal (strange)

zoide commented 1 year ago

@zulus I've uninstalled TM terminal, but the problem still persists. It seems to be locked by C/C++ CDT itself?

zulus commented 1 year ago

@zulus I've uninstalled TM terminal, but the problem still persists. It seems to be locked by C/C++ CDT itself?

TM Terminal is safe (fortunately)

I found dependency in remote project support (inside org.eclipse.ptp.remote feature). In recent snapshot PDT no longer install CDT core (tested on my env). You can update to latest snapshot or just drop "PTP PDT Synchronization Support UI"

zulus commented 1 year ago

PTP report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=582165

zoide commented 1 year ago

Hi again. I still have this issue. I have installed latest nightly of PDT. But I do not have PTP (Parallel Tools Platform?) installed. Also, I do not see any "PTP PDT Synchronization Support UI" installed. I have C/C++ Development Tools installed. I can't get rid of those.

There must be some other component that also causes this issue.

Should I post a list of my installed components?

Thanks.