def updateEditor( self ):
        rule        = self.currentRule()
        operator    = self.currentOperator()
        widget      = self.uiWidgetAREA.widget()
        editorType  = None
        text        = ''
        if ( rule ):
            editorType = rule.editorType(operator)
        if ( widget and editorType and type(widget) == editorType ):
            return
        elif ( widget ):
            if ( type(widget) != QWidget ):
                text = widget.text()
            widget.setParent(None)
            widget.deleteLater()
        self.uiWidgetAREA.setWidget(None)
        if ( editorType ):
            widget = editorType(self)
            if ( isinstance(widget, QLineEdit) ):
                terms  = rule.completionTerms()
                if ( not terms ):
                    qwidget = self.queryBuilderWidget()
                    if ( qwidget ):
                        terms = qwidget.completionTerms()
                if ( terms ):
                    widget.setCompleter(XQueryCompleter(terms, widget))
            self.uiWidgetAREA.setWidget(widget)
            if ( type(widget) != QWidget ):
                widget.setText(text)