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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -