class OpenFile extends AbstractAction {

    private static final String GEPHI_EXTENSION = "gephi";

    OpenFile() {
        super(NbBundle.getMessage(OpenFile.class, "CTL_OpenFile"));
    }

    @Override
    public boolean isEnabled() {
        return Lookup.getDefault().lookup(ProjectControllerUIImpl.class).canOpenFile();
    }

    @Override
    public void actionPerformed(ActionEvent ev) {<FILL_FUNCTION_BODY>}
}

        if (isEnabled()) {
            if (ev != null && ev.getSource() != null && ev.getSource() instanceof File) {
                FileObject fileObject = FileUtil.toFileObject((File) ev.getSource());
                if (fileObject.hasExt(GEPHI_EXTENSION)) {
                    Lookup.getDefault().lookup(ProjectControllerUIImpl.class).openProject(FileUtil.toFile(fileObject));
                } else {
                    ImportControllerUI importController = Lookup.getDefault().lookup(ImportControllerUI.class);
                    if (importController.getImportController().isFileSupported(FileUtil.toFile(fileObject))) {
                        importController.importFile(fileObject);
                    } else {
                        NotifyDescriptor.Message msg = new NotifyDescriptor.Message(
                            NbBundle.getMessage(OpenFile.class, "OpenFile.fileNotSupported"),
                            NotifyDescriptor.WARNING_MESSAGE);
                        DialogDisplayer.getDefault().notify(msg);
                    }
                }
            } else if (ev != null && ev.getSource() != null && ev.getSource() instanceof FileImporterBuilder[]) {
                Lookup.getDefault().lookup(ProjectControllerUIImpl.class)
                    .openFile((FileImporterBuilder[]) ev.getSource());
            } else if (ev != null && ev.getSource() != null && ev.getSource() instanceof Project) {
                Lookup.getDefault().lookup(ProjectControllerUIImpl.class).openProject((Project) ev.getSource());
            } else {
                Lookup.getDefault().lookup(ProjectControllerUIImpl.class).openFile();
            }
        }
    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.String, javax.swing.Icon) ,public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener) ,public java.lang.Object[] getKeys() ,public synchronized java.beans.PropertyChangeListener[] getPropertyChangeListeners() ,public java.lang.Object getValue(java.lang.String) ,public boolean isEnabled() ,public void putValue(java.lang.String, java.lang.Object) ,public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener) ,public void setEnabled(boolean) <variables>private static java.lang.Boolean RECONFIGURE_ON_NULL,private transient javax.swing.ArrayTable arrayTable,protected javax.swing.event.SwingPropertyChangeSupport changeSupport,protected boolean enabled