Reputation: 83
I am opening a .xlsx file in eclipse .It opens internally in MS excel which again contain my excel plugin.Which do not work properly when eclipse open excel internally.
So how can i set ,eclipse always open .xlsx file externally.
Upvotes: 0
Views: 1293
Reputation: 111218
You can define an editor for xlsx in your plugin using the org.eclipse.ui.editors
extension point:
<extension
point="org.eclipse.ui.editors">
<editor
extensions="xlsx"
id="myeditor.id"
icon="icon path"
launcher="myeditor.Launcher"
name="XLSX editor">
</editor>
</extension>
This is using the launcher
attribute to specify that a class to launch an external editor is to be used.
The Launcher
class would be something like:
public class Launcher implements IEditorLauncher
{
public void open(IPath file)
{
File file = file.toFile();
java.awt.Desktop.getDesktop().open(file);
}
}
Upvotes: 1