Eclipse : Open perl file in default editor -


how open perl script file in text editor ?

as if i'm using below code open files in text editor

iworkbenchpage page = activator.getdefault().getworkbench().getactiveworkbenchwindow().getactivepage();     ifilestore filestore = efs.getlocalfilesystem().getstore(new path(path));         try {             ide.openeditoronfilestore(page, filestore);         } catch (partinitexception e1) {             e1.printstacktrace();         } 

text files opened perl script files executed. think uses default file association open file. how can change perl script opened in text editor ?

try this. bypasses lookup default editor in geteditorid() (called openeditoronfilestore()) , directly opens editor choice.

string editorid = "some.editor.id"; ifilestore filestore = efs.getlocalfilesystem().getstore(new path(path)); page.openeditor(new filestoreeditorinput(filestore), editorid); 

(wild guess code, should work)


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -