Search in sources :

Example 1 with GlobalMapKeysEntityFigure

use of org.talend.designer.xmlmap.figures.GlobalMapKeysEntityFigure in project tdi-studio-se by Talend.

the class GlobalMapNodeEditPart 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 GlobalMapKeysEntityFigure) {
            figure = ((GlobalMapKeysEntityFigure) getFigure()).findFigureAt(figureLocation);
        }
        if (figure != null) {
            selectedFigure = (Figure) figure;
            directEditManager = new XmlMapNodeDirectEditManager(this, new XmlMapNodeCellEditorLocator(selectedFigure));
        }
        if (directEditManager != null) {
            directEditManager.show();
            ((XmlMapGraphicViewer) getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
        }
    }
}
Also used : GlobalMapKeysEntityFigure(org.talend.designer.xmlmap.figures.GlobalMapKeysEntityFigure) 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) GlobalMapKeysEntityFigure(org.talend.designer.xmlmap.figures.GlobalMapKeysEntityFigure) TableTreeEntityFigure(org.talend.designer.gefabstractmap.figures.table.entity.TableTreeEntityFigure) Figure(org.eclipse.draw2d.Figure)

Aggregations

Figure (org.eclipse.draw2d.Figure)1 IFigure (org.eclipse.draw2d.IFigure)1 Point (org.eclipse.draw2d.geometry.Point)1 DirectEditRequest (org.eclipse.gef.requests.DirectEditRequest)1 TableTreeEntityFigure (org.talend.designer.gefabstractmap.figures.table.entity.TableTreeEntityFigure)1 XmlMapNodeCellEditorLocator (org.talend.designer.gefabstractmap.part.directedit.XmlMapNodeCellEditorLocator)1 GlobalMapKeysEntityFigure (org.talend.designer.xmlmap.figures.GlobalMapKeysEntityFigure)1 XmlMapNodeDirectEditManager (org.talend.designer.xmlmap.parts.directedit.XmlMapNodeDirectEditManager)1