Summary: | Eclipse executes BAT files instead of editing them | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | David Balažic <david.balazic> |
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | rolf.theunissen |
Version: | 4.16 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 10 | ||
See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=534441 | ||
Whiteboard: |
Description
David Balažic
2020-07-08 09:31:41 EDT
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. |