import org.simantics.modeling.ui.diagramEditor.DiagramEditor;\r
import org.simantics.modeling.ui.diagramEditor.DiagramViewer;\r
import org.simantics.scenegraph.g2d.G2DParentNode;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent;\r
import org.simantics.sysdyn.SysdynResource;\r
import org.simantics.sysdyn.ui.utils.SysdynWorkbenchUtils;\r
import org.simantics.sysdyn.ui.utils.VariableNameValidator;\r
String text = node.getText();\r
if(!new VariableNameValidator().isValid(component, text, false)) {\r
text = textBeforeEdit;\r
+ node.setEditMode(false);\r
node.setText(text);\r
if(new VariableNameValidator().isValid(component, text, false))\r
node.setColor(ElementUtils.getTextColor(e, Color.BLACK));\r
\r
unflipText(e);\r
}\r
+ \r
+ @Override\r
+ public boolean handleMouseEvent(IElement e, final ICanvasContext ctx, MouseEvent me) {\r
+ //if (!(me instanceof MouseEnterEvent) && !(me instanceof MouseMovedEvent) && !(me instanceof MouseExitEvent))\r
+ //System.out.println(me instanceof MouseDragBegin ? "drag begin" : "no drag begin");\r
+ //SysdynWorkbenchUtils.setHoveringHint(ctx, me, SysdynTextElementNoBounds.this);\r
+ return super.handleMouseEvent(e, ctx, me);\r
+ }\r
\r
}\r