eclipse-pde / eclipse.pde

Eclipse Public License 2.0
24 stars 60 forks source link

The new integration becomes the default editor for the bnd.bnd #672

Open juergen-albert opened 1 year ago

juergen-albert commented 1 year ago

It is great for PDE Projects, but this should not be the case if the project has no pde nature. Right now, it becomes the default editor for all our bnd projects.

Can this be changed?

merks commented 1 year ago

Isn't this configurable?

image

maho7791 commented 1 year ago

I already tried this, but it didn't work. I also cannot remove the Plugin-Manifest Editor entry in the preferences (like in your screenshot)

When I am in the bndtools perspective, I still get the PDE editor as default. It seems that the PDE is always taken as default.

juergen-albert commented 1 year ago

I found, that I have to select the Bnd Project Editor in the Associated Editor View and mark it as default editor again, in order to work.

merks commented 1 year ago

I would have expected that if you make a certain editor the default, then it must be the default. So I tried that in my workspace

image

And I see even the icon changes afterwards:

image

And double click opens BND editor. So I think it does work. But you must make it the default editor pushing the Default button...

merks commented 1 year ago

If you have Oomph installed, you could configure that automatically:

<?xml version="1.0" encoding="UTF-8"?>
<workbench:FileAssociationsTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:workbench="http://www.eclipse.org/oomph/setup/workbench/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/setup/workbench/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/Workbench.ecore">
  <mapping filePattern="bnd.bnd"
      defaultEditorID="bndtools.bndProjectEditor"/>
</workbench:FileAssociationsTask>

You could use Navigate -> Open Setup -> User and copy that task into your user.setup so that this is the default everywhere...

Other than this, I'm not sure what you expect PDE to do about this? It's reasonable that it registers its editor in the plugin.xml, right?