Search in sources :

Example 1 with IAutoDirectEdit

use of org.eclipse.wst.xsd.ui.internal.adt.design.editparts.IAutoDirectEdit in project webtools.sourceediting by eclipse.

the class XSDBaseAction method doEdit.

protected void doEdit(Object obj, IWorkbenchPart part) {
    if (obj instanceof TopLevelComponentEditPart) {
        TopLevelComponentEditPart editPart = (TopLevelComponentEditPart) obj;
        if (addedComponent == ((XSDBaseAdapter) editPart.getModel()).getTarget()) {
            editPart.setScroll(true);
            editPart.addFeedback();
            editPart.doEditName(!(part instanceof ContentOutline));
        }
    } else if (obj instanceof BaseFieldEditPart) {
        BaseFieldEditPart editPart = (BaseFieldEditPart) obj;
        editPart.doEditName(!(part instanceof ContentOutline));
    } else if (obj instanceof IAutoDirectEdit) {
        ((IAutoDirectEdit) obj).doEditName(!(part instanceof ContentOutline));
    }
}
Also used : IAutoDirectEdit(org.eclipse.wst.xsd.ui.internal.adt.design.editparts.IAutoDirectEdit) ContentOutline(org.eclipse.ui.views.contentoutline.ContentOutline) TopLevelComponentEditPart(org.eclipse.wst.xsd.ui.internal.design.editparts.TopLevelComponentEditPart) BaseFieldEditPart(org.eclipse.wst.xsd.ui.internal.adt.design.editparts.BaseFieldEditPart)

Aggregations

ContentOutline (org.eclipse.ui.views.contentoutline.ContentOutline)1 BaseFieldEditPart (org.eclipse.wst.xsd.ui.internal.adt.design.editparts.BaseFieldEditPart)1 IAutoDirectEdit (org.eclipse.wst.xsd.ui.internal.adt.design.editparts.IAutoDirectEdit)1 TopLevelComponentEditPart (org.eclipse.wst.xsd.ui.internal.design.editparts.TopLevelComponentEditPart)1