<html>
<head>
<style>
body {
  font-family: Verdana, sans-serif;
  font-size: 0.8em;
  color:#484848;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; }
h1 { font-size: 1.2em; }
h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
hr {
  width: 100%;
  height: 1px;
  background: #ccc;
  border: 0;
}
.footer {
  font-size: 0.8em;
  font-style: italic;
}
</style>
</head>
<body>
<span class="header"></span>
Issue #6587 has been updated by Christopher Brooks.

<ul>
  <li><strong>% Done</strong> changed from <i>0</i> to <i>90</i></li>
</ul>

<p>We now print the missing classes to stdout.</p>


        <p>MessageHandler can have selectable text if you invoke MessageHandler.warning(String, Throwable) and click on the Stack Trace button.  However, in general, we don't call MessageHandler.warning(), we throw an exception instead.  See bug <a href="https://projects.ecoinformatics.org/ecoinfo/issues/4147" class="issue tracker-1 status-3 priority-2 priority-default closed" title="Error message with selectable text (Resolved)">#4147</a> "Error message with selectable text" for details.</p>


        <p>I don't think we want to use MessageHandler.warning() here because it brings up yet another dialog to click through when there is a missing class or classes.  So, I stuck with printing to stderr.  If a dialog is really wanted, then perhaps MoMLParser could check for a property being set before calling MessageHandler?  Maybe</p>


        <p>if (!StringUtilities.getProperty("KEPLER").equals("")) {<br />  MessageHandler.warning("Missing Classes", new Exception(warning.toString()));  <br />}</p>


        <p>A couple of changes I made to the patch:<br />1) Use a HashSet so that missing classes appear only once<br />2) Added a private method to add classes to the Set of missing classes so that we can call this from multiple places.</p>


        <p>The guts of the code look like:</p>


        <pre><code>// See <a class="external" href="https://projects.ecoinformatics.org/ecoinfo/issues/6587">https://projects.ecoinformatics.org/ecoinfo/issues/6587</a>: summarize missing actors       <br />        if (_missingClasses != null) {<br />            StringBuffer warning = new StringBuffer();<br />            for(String missingClass : _missingClasses) {<br />                warning.append(missingClass + ", ");<br />            }<br />            // Get rid of the trailing comma and space.                                                <br />            warning.delete(warning.length()-2, warning.length());</code></pre>


        <pre><code>// Adding another dialog is annoying, so we print out the warning.                         <br />            System.err.println("Warning: Missing Classes: " + warning);</code></pre>


        <pre><code>// MessageHandler(String) is not selectable, so we use MessageHandler(String, Throwable).  <br />            //MessageHandler.warning("Missing Classes", new Exception(warning.toString()));            <br />        }</code></pre>


        <p>The ptII repo change is r69837.</p>


        <p>I'm leaving this for Dan to close if he thinks it is closeable.</p>
<hr />
<h1><a href="https://projects.ecoinformatics.org/ecoinfo/issues/6587#change-21786">Feature #6587: summarize missing actors</a></h1>

<ul>
<li>Author: Daniel Crawl</li>
<li>Status: New</li>
<li>Priority: Normal</li>
<li>Assignee: Daniel Crawl</li>
<li>Category: general</li>
<li>Target version: 2.5.0</li>
  <li>Bugzilla-Id: </li>
</ul>

<p>If a workflow is opened that contains actors that are not present in the class path, an error dialog is displayed for each actor. It would be nice if a list of all the missing actors were displayed.</p>


        <p>Attached is a modified MoMLParser.java (based on ptolemy-kepler-2.4 sources) from Philippe Huyhn that displays the missing actors. The list of missing actors is written to stdout. Using MessageHandler would be preferred since it displays a dialog, but MessageHandler appears to not allow copy and paste.</p>


<hr />
<span class="footer"><p>You have received this notification because you have either subscribed to it, or are involved in it.<br />To change your notification preferences, please click here: <a class="external" href="https://projects.ecoinformatics.org/ecoinfo/my/account">https://projects.ecoinformatics.org/ecoinfo/my/account</a></p></span>
</body>
</html>