Community
Participate
Working Groups
Eclipse IDE for Enterprise Java Developers (includes Incubating components) Version: 2020-06 (4.16.0) Build id: 20200615-1200 When trying to open a BAT file in Eclipse, for editing, it is executed instead. Windows 10, Java 11.0.7 PS: there is also an error reported in Eclipse at the same time: An internal error occurred during: "Search Marketplace for compatible editors (*.bat)". java.lang.NullPointerException
This is kind of expected behavior. By default Eclipse will try to open a file with an file extension that is not associated within eclipse with the registered 'System Editor'. Go to: Window > Preferences > General > Editors > File Associations Either change the default for 'Open unassociated files' or register the .bat extension. Also you could right-click on a file and choose 'Open With...' to use a text editor. However, what is strange behavior, is that Eclipse uses the default 'Open' association instead of the 'Edit' association. That is, Eclipse should trigger the edit action, not the execute action. Do you have a stacktrace for the NPE?
The error log has this: java.lang.NullPointerException at org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob.orderNodesByTagSubExtensionCount(DiscoverFileSupportJob.java:126) at org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob.run(DiscoverFileSupportJob.java:87) at org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob.run(DiscoverFileSupportJob.java:70) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
(In reply to David Balažic from comment #2) > The error log has this: > > java.lang.NullPointerException > at > org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob. > orderNodesByTagSubExtensionCount(DiscoverFileSupportJob.java:126) > at > org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob. > run(DiscoverFileSupportJob.java:87) > at > org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob. > run(DiscoverFileSupportJob.java:70) > at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) This one is reported (and fixed) in Bug 564534.
Also extensions for which only an edit command is registered do not work correctly, see Bug 534441. Moving to SWT for further investigation.