Bug #2409
closedDisplay Name Not Showing for org.sdm.spa.Pause and org.sdm.spa.Stop
0%
Description
org.sdm.spa.Pause and org.sdm.spa.Stop
When dragged to canvas, name ("Pause" or "Stop") does not show up. Right click on actor and select "Customize Name" - in this dialog, the "Show Name" checkbox is unchecked; however, if you check it and commit, you get an exception:
ptolemy.kernel.util.IllegalActionException: Cannot delete. This attribute is part of the class definition.
in .all-actors-displayed-part1a.Pause._hideName
at ptolemy.moml.MoMLParser._deleteProperty(MoMLParser.java:3955)
at ptolemy.moml.MoMLParser.access$500(MoMLParser.java:199)
at ptolemy.moml.MoMLParser$DeleteRequest.execute(MoMLParser.java:6280)
at ptolemy.moml.MoMLParser._processPendingRequests(MoMLParser.java:5488)
at ptolemy.moml.MoMLParser.endElement(MoMLParser.java:854)
at com.microstar.xml.XmlParser.parseETag(XmlParser.java:1023)
at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1095)
at com.microstar.xml.XmlParser.parseElement(XmlParser.java:921)
at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:479)
at com.microstar.xml.XmlParser.doParse(XmlParser.java:157)
at com.microstar.xml.XmlParser.parse(XmlParser.java:130)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1281)
at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1409)
at ptolemy.moml.MoMLChangeRequest._execute(MoMLChangeRequest.java:270)
at ptolemy.kernel.util.ChangeRequest.execute(ChangeRequest.java:139)
at ptolemy.kernel.util.NamedObj.executeChangeRequests(NamedObj.java:685)
at ptolemy.kernel.util.NamedObj.requestChange(NamedObj.java:1618)
at ptolemy.actor.CompositeActor.requestChange(CompositeActor.java:907)
at ptolemy.actor.gui.RenameConfigurer.apply(RenameConfigurer.java:165)
at ptolemy.actor.gui.RenameDialog._handleClosing(RenameDialog.java:69)
at ptolemy.gui.ComponentDialog$1.propertyChange(ComponentDialog.java:192)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
at java.awt.Component.firePropertyChange(Component.java:7225)
at javax.swing.JOptionPane.setValue(JOptionPane.java:1896)
at javax.swing.plaf.basic.BasicOptionPaneUI$ButtonActionListener.actionPerformed(BasicOptionPaneUI.java:1182)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5554)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5319)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4021)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:186)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at java.awt.Component.show(Component.java:1300)
at java.awt.Component.setVisible(Component.java:1253)
at ptolemy.gui.ComponentDialog.<init>(ComponentDialog.java:233)
at ptolemy.gui.ComponentDialog.<init>(ComponentDialog.java:101)
at ptolemy.actor.gui.RenameDialog.<init>(RenameDialog.java:56)
at ptolemy.vergil.kernel.RenameDialogFactory$1.actionPerformed(RenameDialogFactory.java:94)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5554)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5319)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4021)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:182)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Updated by Matthew Brooke over 18 years ago
may be intermittent - subsequently was able to get "Stop" to show up, even though it had failed previously - but still not Pause.
Specifically, was using the workflow:
kepler/workflows/test/all-actors-displayed-part1a.xml
Updated by Matthew Brooke over 18 years ago
This is actually a "feature" - the name was hidden in Ptolemy because it was displayed as part of the icon.
The source code for these actors has the following lines in the constructor:
// Hide the name because the name is in the icon.
_hideName = new SingletonParameter(this, "_hideName");
_hideName.setToken(BooleanToken.TRUE);
_hideName.setVisibility(Settable.EXPERT);
Updated by Matthew Brooke over 18 years ago
Overrode assignment in code by adding this to MOML:
<property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="false"/>