Search in sources :

Example 6 with XmlMapNodeDirectEditManager

use of org.talend.designer.xmlmap.parts.directedit.XmlMapNodeDirectEditManager in project tdi-studio-se by Talend.

the class VarNodeEditPart method performRequest.

@Override
public void performRequest(Request req) {
    IFigure figure = null;
    Figure selectedFigure = null;
    if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
        DirectEditRequest drequest = (DirectEditRequest) req;
        Point figureLocation = drequest.getLocation();
        if (getFigure() instanceof VarEntityFigure) {
            figure = ((VarEntityFigure) getFigure()).findFigureAt(figureLocation);
        }
        // if (figure != null ) {
        if (figure != null) {
            // if (figure instanceof VariableContainerFigure) {
            // figure = ((VariableContainerFigure) figure).getVariableLabel();
            // }
            selectedFigure = (Figure) figure;
            directEditManager = new XmlMapNodeDirectEditManager(this, new XmlMapNodeCellEditorLocator(selectedFigure));
        }
        // }
        if (directEditManager != null) {
            directEditManager.show();
            ((XmlMapGraphicViewer) getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
        }
    }
}
Also used : VarEntityFigure(org.talend.designer.gefabstractmap.figures.var.VarEntityFigure) XmlMapNodeDirectEditManager(org.talend.designer.xmlmap.parts.directedit.XmlMapNodeDirectEditManager) XmlMapNodeCellEditorLocator(org.talend.designer.gefabstractmap.part.directedit.XmlMapNodeCellEditorLocator) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) Point(org.eclipse.draw2d.geometry.Point) IFigure(org.eclipse.draw2d.IFigure) IFigure(org.eclipse.draw2d.IFigure) ImageFigure(org.eclipse.draw2d.ImageFigure) VarNodeFigure(org.talend.designer.xmlmap.figures.varnode.VarNodeFigure) VarEntityFigure(org.talend.designer.gefabstractmap.figures.var.VarEntityFigure) Figure(org.eclipse.draw2d.Figure)

Aggregations

IFigure (org.eclipse.draw2d.IFigure)6 Point (org.eclipse.draw2d.geometry.Point)6 DirectEditRequest (org.eclipse.gef.requests.DirectEditRequest)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 TreeNode (org.talend.designer.xmlmap.model.emf.xmlmap.TreeNode)1