cxbrooks / test

Second test for bugzilla to git
0 stars 0 forks source link

Given a Subscriber, find all Publishers or vice versa #215

Closed cxbrooks closed 12 years ago

cxbrooks commented 14 years ago

Note: the issue was created automatically with bugzilla2github tool

Original bug ID: BZ#333 From: @cxbrooks Reported version: 8.1.devel CC: pt-dev@chess.eecs.berkeley.edu

cxbrooks commented 14 years ago

From the April, 2010 visit, Warren writes: "`Pub/Sub UI Improvements - Add in ability in UI to find all Subscribers to a given Publisher and vice versa."

Probably the best way to do this would be to have a search mechanism that brought up a tree view. It is not clear how much effort a search mechanism would take.

cxbrooks commented 14 years ago

We have "DependencyHighlighter", which should work here:

  1. $PTII/bin/vergil ~/ptII/ptolemy/actor/lib/test/auto/PublisherSubscriber9.xml
  2. Utilities | Analysis
  3. Drag HighlightDependents onto the Publisher
  4. Right click and select "Highlight dependents"

Unfortunately, we get a stack trace:

com.microstar.xml.XmlException: Cannot create entity without a class name. in [external stream] at line 3 and column 25 at ptolemy.moml.MoMLParser._checkForNull(MoMLParser.java:3792) at ptolemy.moml.MoMLParser._createEntity(MoMLParser.java:3973) at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2493) at com.microstar.xml.XmlParser.parseElement(XmlParser.java:921) at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1104) at com.microstar.xml.XmlParser.parseElement(XmlParser.java:924) at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:481) at com.microstar.xml.XmlParser.doParse(XmlParser.java:159) at com.microstar.xml.XmlParser.parse(XmlParser.java:132) at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1402) at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1374) at ptolemy.moml.MoMLParser.parse(MoMLParser.java:1530) at ptolemy.moml.MoMLChangeRequest._execute(MoMLChangeRequest.java:289) at ptolemy.kernel.util.ChangeRequest.execute(ChangeRequest.java:171) at ptolemy.kernel.util.NamedObj.executeChangeRequests(NamedObj.java:732) at ptolemy.kernel.util.NamedObj.requestChange(NamedObj.java:1772) at ptolemy.actor.CompositeActor.requestChange(CompositeActor.java:1858) at ptolemy.kernel.util.NamedObj.requestChange(NamedObj.java:1755) at ptolemy.vergil.basic.DependencyHighlighter$HighlightDependents.actionPerformed(DependencyHighlighter.java:262) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:389) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223) at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6348) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6113) at java.awt.Container.processEvent(Container.java:2085) at java.awt.Component.dispatchEventImpl(Component.java:4714) at java.awt.Container.dispatchEventImpl(Container.java:2143) at java.awt.Component.dispatchEvent(Component.java:4544) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212) at java.awt.Container.dispatchEventImpl(Container.java:2129) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4544) at java.awt.EventQueue.dispatchEvent(EventQueue.java:635) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

cxbrooks commented 12 years ago

This is completed:

If you drag a Utilities -> Analysis -> DependencyAnalysis attribute on to an actor, a new menu choice appears: "List dependencies and prereqs."

The underlying code is in actor/util/ActorDependencies.java.

The underlying code is ugly, but it works for finding Publishers and Subscribers.