Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] How does the workbench know which editor to use to open up a specific file?

Hi,

 

In the gef flow example plugin source code, class FlowWizardPage1,

 

public boolean finish() {

            IFile newFile = createNewFile();

            ……..

                        ……….

 

                        IWorkbenchWindow dwindow = workbench.getActiveWorkbenchWindow();

                        IWorkbenchPage page = dwindow.getActivePage();

                        if (page != null)

                                    IDE.openEditor(page, newFile, true);       

 

}

 

I could not figure out how does the workbench know to use the FlowEditor (defined in FlowEditor.java) to open up this file. There is nowhere this rule is defined or specified.

 

Apparently there is a missing link in my understanding, could you please help me out here?

 

Thank you

 

 

 


Back to the top