Search in sources :

Example 1 with TopLevelNameDirectEditManager

use of org.eclipse.wst.xsd.ui.internal.design.editpolicies.TopLevelNameDirectEditManager in project webtools.sourceediting by eclipse.

the class TopLevelComponentEditPart method doEditName.

public void doEditName(boolean addFromDesign) {
    if (!addFromDesign)
        return;
    // removeFeedback();
    Object object = ((XSDBaseAdapter) getModel()).getTarget();
    if (object instanceof XSDNamedComponent) {
        Point p = label.getLocation();
        TopLevelNameDirectEditManager manager = new TopLevelNameDirectEditManager(TopLevelComponentEditPart.this, new TopLevelComponentLabelCellEditorLocator(TopLevelComponentEditPart.this, p), (XSDNamedComponent) object);
        NameUpdateCommandWrapper wrapper = new NameUpdateCommandWrapper();
        adtDirectEditPolicy.setUpdateCommand(wrapper);
        manager.show();
    }
}
Also used : TopLevelNameDirectEditManager(org.eclipse.wst.xsd.ui.internal.design.editpolicies.TopLevelNameDirectEditManager) XSDNamedComponent(org.eclipse.xsd.XSDNamedComponent) TopLevelComponentLabelCellEditorLocator(org.eclipse.wst.xsd.ui.internal.design.editpolicies.TopLevelComponentLabelCellEditorLocator) XSDBaseAdapter(org.eclipse.wst.xsd.ui.internal.adapters.XSDBaseAdapter) Point(org.eclipse.draw2d.geometry.Point)

Aggregations

Point (org.eclipse.draw2d.geometry.Point)1 XSDBaseAdapter (org.eclipse.wst.xsd.ui.internal.adapters.XSDBaseAdapter)1 TopLevelComponentLabelCellEditorLocator (org.eclipse.wst.xsd.ui.internal.design.editpolicies.TopLevelComponentLabelCellEditorLocator)1 TopLevelNameDirectEditManager (org.eclipse.wst.xsd.ui.internal.design.editpolicies.TopLevelNameDirectEditManager)1 XSDNamedComponent (org.eclipse.xsd.XSDNamedComponent)1