use of org.talend.designer.gefabstractmap.figures.cells.IWidgetCell in project tdi-studio-se by Talend.
the class OutputXmlTreeEditPart method performRequest.
@Override
public void performRequest(Request req) {
if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
DirectEditRequest drequest = (DirectEditRequest) req;
Point figureLocation = drequest.getLocation();
IFigure findFigureAt = getFigure().findFigureAt(figureLocation.x, figureLocation.y);
if (findFigureAt != null && findFigureAt instanceof IWidgetCell) {
directEditManager = new XmlMapNodeDirectEditManager(this, new XmlMapNodeCellEditorLocator((Figure) findFigureAt));
directEditManager.show();
}
if (directEditManager != null) {
if (findFigureAt != null && findFigureAt instanceof FilterTextArea) {
if (figure.containsPoint(figureLocation)) {
directEditManager.show();
((XmlMapGraphicViewer) getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
}
}
}
}
}
use of org.talend.designer.gefabstractmap.figures.cells.IWidgetCell in project tdi-studio-se by Talend.
the class TreeNodeEditPart method performRequest.
@Override
public void performRequest(Request req) {
if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
Figure figure = null;
DirectEditRequest drequest = (DirectEditRequest) req;
Point figureLocation = drequest.getLocation();
if (getFigure() instanceof TableTreeEntityFigure) {
XmlmapTreeNodeFigure treeNodeFigure = (XmlmapTreeNodeFigure) getFigure();
ArrayList collection = new ArrayList();
collection.add(treeNodeFigure.getExpressionFigure());
collection.add(treeNodeFigure.getBranchContent());
figure = (Figure) treeNodeFigure.findFigureAt(figureLocation.x, figureLocation.y, new FigureSearch(collection));
}
if (figure instanceof IWidgetCell) {
directEditManager = new XmlMapNodeDirectEditManager(this, new XmlMapNodeCellEditorLocator(figure, this));
}
if (directEditManager != null) {
TreeNode outputTreeNode = (TreeNode) getModel();
if (figure instanceof ExpressionFigure) {
if (XmlMapUtil.isExpressionEditable(outputTreeNode)) {
Point location = drequest.getLocation();
if (figure.containsPoint(location)) {
directEditManager.show();
((XmlMapGraphicViewer) getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
}
}
} else if (!(((TreeNode) getModel()).eContainer() instanceof AbstractInOutTree)) {
// disable for RC2
// directEditManager.show();
// ((XmlMapGraphicViewer)
// getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
}
}
}
super.performRequest(req);
}
use of org.talend.designer.gefabstractmap.figures.cells.IWidgetCell in project tdi-studio-se by Talend.
the class InputXmlTreeEditPart method performRequest.
@Override
public void performRequest(Request req) {
if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
DirectEditRequest drequest = (DirectEditRequest) req;
Point figureLocation = drequest.getLocation();
IFigure findFigureAt = getFigure().findFigureAt(figureLocation.x, figureLocation.y);
if (findFigureAt != null && findFigureAt instanceof IWidgetCell) {
directEditManager = new XmlMapNodeDirectEditManager(this, new XmlMapNodeCellEditorLocator((Figure) findFigureAt));
directEditManager.show();
}
if (directEditManager != null) {
if (findFigureAt != null && findFigureAt instanceof FilterTextArea) {
if (figure.containsPoint(figureLocation)) {
directEditManager.show();
((XmlMapGraphicViewer) getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
}
}
}
}
}
Aggregations