Search in sources :

Example 6 with DirectEditRequest

use of org.eclipse.gef.requests.DirectEditRequest in project tdi-studio-se by Talend.

the class GearBusinessItemNameEditPart method performDirectEditRequest.

/**
     * @generated
     */
protected void performDirectEditRequest(Request request) {
    final Request theRequest = request;
    try {
        getEditingDomain().runExclusive(new Runnable() {

            public void run() {
                if (isActive() && isEditable()) {
                    if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
                        Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
                        performDirectEdit(initialChar.charValue());
                    } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
                        DirectEditRequest editRequest = (DirectEditRequest) theRequest;
                        performDirectEdit(editRequest.getLocation());
                    } else {
                        performDirectEdit();
                    }
                }
            }
        });
    } catch (InterruptedException e) {
        // e.printStackTrace();
        ExceptionHandler.process(e);
    }
}
Also used : DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest)

Example 7 with DirectEditRequest

use of org.eclipse.gef.requests.DirectEditRequest in project tdi-studio-se by Talend.

the class DirectionalBusinessItemRelationshipNameEditPart method performDirectEditRequest.

/**
     * @generated
     */
protected void performDirectEditRequest(Request request) {
    final Request theRequest = request;
    try {
        getEditingDomain().runExclusive(new Runnable() {

            public void run() {
                if (isActive() && isEditable()) {
                    if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
                        Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
                        performDirectEdit(initialChar.charValue());
                    } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
                        DirectEditRequest editRequest = (DirectEditRequest) theRequest;
                        performDirectEdit(editRequest.getLocation());
                    } else {
                        performDirectEdit();
                    }
                }
            }
        });
    } catch (InterruptedException e) {
        // e.printStackTrace();
        ExceptionHandler.process(e);
    }
}
Also used : DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest)

Example 8 with DirectEditRequest

use of org.eclipse.gef.requests.DirectEditRequest in project tdi-studio-se by Talend.

the class DocumentBusinessItemNameEditPart method performDirectEditRequest.

/**
     * @generated
     */
protected void performDirectEditRequest(Request request) {
    final Request theRequest = request;
    try {
        getEditingDomain().runExclusive(new Runnable() {

            public void run() {
                if (isActive() && isEditable()) {
                    if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
                        Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
                        performDirectEdit(initialChar.charValue());
                    } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
                        DirectEditRequest editRequest = (DirectEditRequest) theRequest;
                        performDirectEdit(editRequest.getLocation());
                    } else {
                        performDirectEdit();
                    }
                }
            }
        });
    } catch (InterruptedException e) {
        // e.printStackTrace();
        ExceptionHandler.process(e);
    }
}
Also used : DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest)

Example 9 with DirectEditRequest

use of org.eclipse.gef.requests.DirectEditRequest in project tdi-studio-se by Talend.

the class ActionBusinessItemNameEditPart method performDirectEditRequest.

/**
     * @generated
     */
protected void performDirectEditRequest(Request request) {
    final Request theRequest = request;
    try {
        getEditingDomain().runExclusive(new Runnable() {

            public void run() {
                if (isActive() && isEditable()) {
                    if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
                        Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
                        performDirectEdit(initialChar.charValue());
                    } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
                        DirectEditRequest editRequest = (DirectEditRequest) theRequest;
                        performDirectEdit(editRequest.getLocation());
                    } else {
                        performDirectEdit();
                    }
                }
            }
        });
    } catch (InterruptedException e) {
        // e.printStackTrace();
        ExceptionHandler.process(e);
    }
}
Also used : DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest)

Example 10 with DirectEditRequest

use of org.eclipse.gef.requests.DirectEditRequest in project tdi-studio-se by Talend.

the class BidirectionalBusinessItemRelationshipNameEditPart method performDirectEditRequest.

/**
     * @generated
     */
protected void performDirectEditRequest(Request request) {
    final Request theRequest = request;
    try {
        getEditingDomain().runExclusive(new Runnable() {

            public void run() {
                if (isActive() && isEditable()) {
                    if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
                        Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
                        performDirectEdit(initialChar.charValue());
                    } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
                        DirectEditRequest editRequest = (DirectEditRequest) theRequest;
                        performDirectEdit(editRequest.getLocation());
                    } else {
                        performDirectEdit();
                    }
                }
            }
        });
    } catch (InterruptedException e) {
        // e.printStackTrace();
        ExceptionHandler.process(e);
    }
}
Also used : DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest)

Aggregations

DirectEditRequest (org.eclipse.gef.requests.DirectEditRequest)21 Request (org.eclipse.gef.Request)14 IFigure (org.eclipse.draw2d.IFigure)6 Point (org.eclipse.draw2d.geometry.Point)6 XmlMapNodeCellEditorLocator (org.talend.designer.gefabstractmap.part.directedit.XmlMapNodeCellEditorLocator)6 XmlMapNodeDirectEditManager (org.talend.designer.xmlmap.parts.directedit.XmlMapNodeDirectEditManager)6 Figure (org.eclipse.draw2d.Figure)3 IWidgetCell (org.talend.designer.gefabstractmap.figures.cells.IWidgetCell)3 TableTreeEntityFigure (org.talend.designer.gefabstractmap.figures.table.entity.TableTreeEntityFigure)2 FilterTextArea (org.talend.designer.gefabstractmap.figures.treesettings.FilterTextArea)2 ArrayList (java.util.ArrayList)1 ImageFigure (org.eclipse.draw2d.ImageFigure)1 Label (org.eclipse.draw2d.Label)1 ExpressionFigure (org.talend.designer.gefabstractmap.figures.ExpressionFigure)1 VarEntityFigure (org.talend.designer.gefabstractmap.figures.var.VarEntityFigure)1 GlobalMapKeysEntityFigure (org.talend.designer.xmlmap.figures.GlobalMapKeysEntityFigure)1 XmlmapTreeNodeFigure (org.talend.designer.xmlmap.figures.treeNode.XmlmapTreeNodeFigure)1 VarNodeFigure (org.talend.designer.xmlmap.figures.varnode.VarNodeFigure)1 AbstractInOutTree (org.talend.designer.xmlmap.model.emf.xmlmap.AbstractInOutTree)1 OutputTreeNode (org.talend.designer.xmlmap.model.emf.xmlmap.OutputTreeNode)1