bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
private void generatePackageList() throws IOException { File file = new File(outputDir, "frame-packages.html"); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.println("<title>Coverage Report</title>"); out .println("<link title=\"Style\" type=\"text/css\" rel=\"stylesheet\" href=\"css/main.css\" />"); out.println("</head>"); out.println("<body>"); out.println("<h5>Packages</h5>"); out.println("<table width=\"100%\">"); out.println("<tr>"); out .println("<td nowrap=\"nowrap\"><a href=\"frame-summary.html\" onClick='parent.classList.location.href=\"frame-classes.html\"' target=\"summary\">All</a></td>"); out.println("</tr>"); Iterator iter = coverage.getPackages().iterator(); while (iter.hasNext()) { Package pkg = (Package)iter.next(); String url1 = "frame-summary-" + pkg.getName() + ".html"; String url2 = "frame-classes-" + pkg.getName() + ".html"; out.println("<tr>"); out.println("<td nowrap=\"nowrap\"><a href=\"" + url1 + "\" onClick='parent.classList.location.href=\"" + url2 + "\"' target=\"summary\">" + pkg.getName() + "</a></td>"); out.println("</tr>"); } out.println("</table>"); out.println("</body>"); out.println("</html>"); } finally { if (out != null) { out.close(); } } }
private void generatePackageList() throws IOException { File file = new File(outputDir, "frame-packages.html"); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.println("<title>Coverage Report</title>"); out .println("<link title=\"Style\" type=\"text/css\" rel=\"stylesheet\" href=\"css/main.css\" />"); out.println("</head>"); out.println("<body>"); out.println("<h5>Packages</h5>"); out.println("<table width=\"100%\">"); out.println("<tr>"); out .println("<td nowrap=\"nowrap\"><a href=\"frame-summary.html\" onClick='parent.classList.location.href=\"frame-classes.html\"' target=\"summary\">All</a></td>"); out.println("</tr>"); Iterator iter = coverage.getPackages().iterator(); while (iter.hasNext()) { Package pkg = (Package)iter.next(); String url1 = "frame-summary-" + pkg.getName() + ".html"; String url2 = "frame-classes-" + pkg.getName() + ".html"; out.println("<tr>"); out.println("<td nowrap=\"nowrap\"><a href=\"" + url1 + "\" onClick='parent.classList.location.href=\"" + url2 + "\"' target=\"summary\">" + pkg.getName() + "</a></td>"); out.println("</tr>"); } out.println("</table>"); out.println("</body>"); out.println("</html>"); } finally { if (out != null) { out.close(); } } }
3,236,813
private void generateSourceFile(Clazz clazz) throws IOException { String filename = clazz.getLongName() + ".html"; File file = new File(outputDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.println("<title>Coverage Report</title>"); out .println("<link title=\"Style\" type=\"text/css\" rel=\"stylesheet\" href=\"css/main.css\" />"); out .println("<script type=\"text/javascript\" src=\"js/popup.js\"></script>"); out.println("</head>"); out.println("<body>"); out.print("<h5>Coverage Report - "); if (clazz.getPackageName() != null) { out.print(clazz.getPackageName() + "."); } out.print(clazz.getName()); out.println("</h5>"); // Output the coverage summary for this class out.println("<p>"); out.println("<table class=\"report\">"); out.println(generateTableHeaderForClasses()); out.println(generateTableRowForClass(clazz)); out.println("</table>"); out.println("</p>"); // Output this class's source code with syntax and coverage highlighting out.println("<p>"); out .println("<table cellspacing=\"0\" cellpadding=\"0\" class=\"src\">"); BufferedReader br = null; try { br = new BufferedReader(new FileReader(new File(sourceDir, clazz.getLongFileName()))); String lineStr; JavaToHtml javaToHtml = new JavaToHtml(); int lineNumber = 1; while ((lineStr = br.readLine()) != null) { out.println("<tr>"); if (clazz.isValidSourceLine(lineNumber)) { long numberOfHits = clazz.getNumberOfHits(lineNumber); out.println(" <td class=\"numLineCover\">&nbsp;" + lineNumber + "</td>"); if (numberOfHits > 0) { out .println(" <td class=\"nbHitsCovered\">&nbsp;" + numberOfHits + "</td>"); out .println(" <td class=\"src\"><pre class=\"src\">&nbsp;" + javaToHtml.process(lineStr) + "</pre></td>"); } else { out .println(" <td class=\"nbHitsUncovered\">&nbsp;" + numberOfHits + "</td>"); out .println(" <td class=\"src\"><pre class=\"src\"><span class=\"srcUncovered\">&nbsp;" + javaToHtml.process(lineStr) + "</span></pre></td>"); } } else { out.println(" <td class=\"numLine\">&nbsp;" + lineNumber + "</td>"); out.println(" <td class=\"nbHits\">&nbsp;</td>"); out .println(" <td class=\"src\"><pre class=\"src\">&nbsp;" + javaToHtml.process(lineStr) + "</pre></td>"); } out.println("</tr>"); lineNumber++; } } finally { if (br != null) { br.close(); } } out.println("</table>"); out.println("</p>"); out.println("<div class=\"footer\">"); out .println("Reports generated by <a href=\"http://cobertura.sourceforge.net/\" target=\"_top\">Cobertura</a>."); out.println("</div>"); out.println("</body>"); out.println("</html>"); } finally { if (out != null) { out.close(); } } }
private void generateSourceFile(Clazz clazz) throws IOException { String filename = clazz.getLongName() + ".html"; File file = new File(outputDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.println("<title>Coverage Report</title>"); out .println("<link title=\"Style\" type=\"text/css\" rel=\"stylesheet\" href=\"css/main.css\" />"); out .println("<script type=\"text/javascript\" src=\"js/popup.js\"></script>"); out.println("</head>"); out.println("<body>"); out.print("<h5>Coverage Report - "); if (clazz.getPackageName() != null) { out.print(clazz.getPackageName() + "."); } out.print(clazz.getName()); out.println("</h5>"); // Output the coverage summary for this class out.println("<p>"); out.println("<table class=\"report\">"); out.println(generateTableHeaderForClasses()); out.println(generateTableRowForClass(clazz)); out.println("</table>"); out.println("</p>"); // Output this class's source code with syntax and coverage highlighting out.println("<p>"); out .println("<table cellspacing=\"0\" cellpadding=\"0\" class=\"src\">"); BufferedReader br = null; try { br = new BufferedReader(new FileReader(new File(sourceDir, clazz.getLongFileName()))); String lineStr; JavaToHtml javaToHtml = new JavaToHtml(); int lineNumber = 1; while ((lineStr = br.readLine()) != null) { out.println("<tr>"); if (clazz.isValidSourceLine(lineNumber)) { long numberOfHits = clazz.getNumberOfHits(lineNumber); out.println(" <td class=\"numLineCover\">&nbsp;" + lineNumber + "</td>"); if (numberOfHits > 0) { out .println(" <td class=\"nbHitsCovered\">&nbsp;" + numberOfHits + "</td>"); out .println(" <td class=\"src\"><pre class=\"src\">&nbsp;" + javaToHtml.process(lineStr) + "</pre></td>"); } else { out .println(" <td class=\"nbHitsUncovered\">&nbsp;" + numberOfHits + "</td>"); out .println(" <td class=\"src\"><pre class=\"src\"><span class=\"srcUncovered\">&nbsp;" + javaToHtml.process(lineStr) + "</span></pre></td>"); } } else { out.println(" <td class=\"numLine\">&nbsp;" + lineNumber + "</td>"); out.println(" <td class=\"nbHits\">&nbsp;</td>"); out .println(" <td class=\"src\"><pre class=\"src\">&nbsp;" + javaToHtml.process(lineStr) + "</pre></td>"); } out.println("</tr>"); lineNumber++; } } finally { if (br != null) { br.close(); } } out.println("</table>"); out.println("</p>"); out.println("<div class=\"footer\">"); out .println("Reports generated by <a href=\"http://cobertura.sourceforge.net/\" target=\"_top\">Cobertura</a>."); out.println("</div>"); out.println("</body>"); out.println("</html>"); } finally { if (out != null) { out.close(); } } }
3,236,814
private String generateTableRowForPackage(Package pkg) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + pkg.getName() + ".html"; String url2 = "frame-classes-" + pkg.getName() + ".html"; double lineCoverage = pkg.getLineCoverageRate(); double branchCoverage = pkg.getBranchCoverageRate(); double ccn = Util.getCCN(new File(sourceDir, pkg.getFileName()), false); ret.append(" <tr>"); ret.append("<td class=\"text\"><a href=\"" + url1 + "\" onClick='parent.classList.location.href=\"" + url2 + "\"'>" + pkg.getName() + "</a></td>"); ret .append("<td class=\"value\">" + pkg.getClasses().size() + "</td>"); ret.append(generateTableColumnsFromData(lineCoverage, branchCoverage, ccn)); ret.append("</tr>"); return ret.toString(); }
private String generateTableRowForPackage(Package pkg) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + pkg.getName() + ".html"; String url2 = "frame-classes-" + pkg.getName() + ".html"; double lineCoverage = pkg.getLineCoverageRate(); double branchCoverage = pkg.getBranchCoverageRate(); double ccn = Util.getCCN(new File(sourceDir, pkg.getFileName()), false); ret.append(" <tr>"); ret.append("<td class=\"text\"><a href=\"" + url1 + "\" onClick='parent.classList.location.href=\"" + url2 + "\"'>" + pkg.getName() + "</a></td>"); ret .append("<td class=\"value\">" + pkg.getClasses().size() + "</td>"); ret.append(generateTableColumnsFromData(lineCoverage, branchCoverage, ccn)); ret.append("</tr>"); return ret.toString(); }
3,236,815
public synchronized Collection getChainExecutions() { // if we're done, go for it. if (chainExecutions != null) { return chainExecutions.getExecutions(); } if (gettingExecutions == false) { long start = System.currentTimeMillis(); gettingExecutions = true; retrieveChainExecutions(); gettingExecutions = false; notifyAll(); long getTime = System.currentTimeMillis()-start; System.err.println("time for executions is "+getTime); return chainExecutions.getExecutions(); } else {// in progress try{ wait(); return chainExecutions.getExecutions(); } catch (InterruptedException e) { return null; } } }
public synchronized Collection getChainExecutions() { // if we're done, go for it. if (chainExecutions != null) { return chainExecutions.getExecutions(); } if (gettingExecutions == false) { long start = System.currentTimeMillis(); gettingExecutions = true; retrieveChainExecutions(); gettingExecutions = false; notifyAll(); long getTime = System.currentTimeMillis()-start; System.err.println("time for executions is "+getTime); return chainExecutions.getExecutions(); } else {// in progress try{ wait(); return chainExecutions.getExecutions(); } catch (InterruptedException e) { return null; } } }
3,236,816
public synchronized Collection getChainExecutions() { // if we're done, go for it. if (chainExecutions != null) { return chainExecutions.getExecutions(); } if (gettingExecutions == false) { long start = System.currentTimeMillis(); gettingExecutions = true; retrieveChainExecutions(); gettingExecutions = false; notifyAll(); long getTime = System.currentTimeMillis()-start; System.err.println("time for executions is "+getTime); return chainExecutions.getExecutions(); } else {// in progress try{ wait(); return chainExecutions.getExecutions(); } catch (InterruptedException e) { return null; } } }
public synchronized Collection getChainExecutions() { // if we're done, go for it. if (chainExecutions != null) { return chainExecutions.getExecutions(); } if (gettingExecutions == false) { long start = System.currentTimeMillis(); gettingExecutions = true; retrieveChainExecutions(); gettingExecutions = false; notifyAll(); long getTime = System.currentTimeMillis()-start; System.err.println("time for executions is "+getTime); return chainExecutions.getExecutions(); } else {// in progress try{ wait(); return chainExecutions.getExecutions(); } catch (InterruptedException e) { return null; } } }
3,236,817
public synchronized Collection getChains() { Collection res = null; // if we're done, go for it. if (chainHash != null && chainHash.size() > 0) { res = chainHash.values(); } else { if (gettingChains == false) { long start = System.currentTimeMillis(); gettingChains = true; retrieveChains(); gettingChains = false; notifyAll(); long end = System.currentTimeMillis()-start; System.err.println("time for retrieving chains.. "+end); res = chainHash.values(); } else {// in progress try{ wait(); res = chainHash.values(); } catch (InterruptedException e) { res = null; } } } return res; }
public synchronized Collection getChains() { Collection res = null; // if we're done, go for it. if (chainHash != null && chainHash.size() > 0) { res = chainHash.values(); } else { if (gettingChains == false) { long start = System.currentTimeMillis(); gettingChains = true; retrieveChains(); gettingChains = false; notifyAll(); long end = System.currentTimeMillis()-start; System.err.println("time for retrieving chains.. "+end); res = chainHash.values(); } else {// in progress try{ wait(); res = chainHash.values(); } catch (InterruptedException e) { res = null; } } } return res; }
3,236,818
public synchronized Collection getChains() { Collection res = null; // if we're done, go for it. if (chainHash != null && chainHash.size() > 0) { res = chainHash.values(); } else { if (gettingChains == false) { long start = System.currentTimeMillis(); gettingChains = true; retrieveChains(); gettingChains = false; notifyAll(); long end = System.currentTimeMillis()-start; System.err.println("time for retrieving chains.. "+end); res = chainHash.values(); } else {// in progress try{ wait(); res = chainHash.values(); } catch (InterruptedException e) { res = null; } } } return res; }
public synchronized Collection getChains() { Collection res = null; // if we're done, go for it. if (chainHash != null && chainHash.size() > 0) { res = chainHash.values(); } else { if (gettingChains == false) { long start = System.currentTimeMillis(); gettingChains = true; retrieveChains(); gettingChains = false; notifyAll(); long end = System.currentTimeMillis()-start; System.err.println("time for retrieving chains.. "+end); res = chainHash.values(); } else {// in progress try{ wait(); res = chainHash.values(); } catch (InterruptedException e) { res = null; } } } return res; }
3,236,819
public List childNodes() { return Collections.EMPTY_LIST; }
public List childNodes() { return EMPTY_LIST; }
3,236,820
private void init(ViewerCtrl control, int maxT, int maxZ, MovieSettings settings) { int max = maxT; int s = settings.getStartT(), e = settings.getEndT(); if (maxT == 0) { s = settings.getStartZ(); e = settings.getEndZ(); max = maxZ; } PlayerManager manager = new PlayerManager(this, control, max, settings.getMovieIndex(), s, e); player = new PlayerUI(manager, control.getRegistry(), maxT, maxZ, settings); }
private void init(ViewerCtrl control, int maxT, int maxZ, MovieSettings settings) { int max = maxT; int s = settings.getStartT(), e = settings.getEndT(); if (maxT == 0) { s = settings.getStartZ(); e = settings.getEndZ(); max = maxZ; } manager = new PlayerManager(this, control, max, settings.getMovieIndex(), s, e); player = new PlayerUI(manager, control.getRegistry(), maxT, maxZ, settings); }
3,236,821
public void processPacket(final Packet packet) { SwingUtilities.invokeLater(new Runnable() { public void run() { final Message message = (Message)packet; boolean broadcast = message.getProperty("broadcast") != null; if ((broadcast || message.getType() == Message.Type.NORMAL) && message.getBody() != null) { showAlert((Message)packet); } else { String host = SparkManager.getSessionManager().getServerAddress(); String from = packet.getFrom() != null ? packet.getFrom() : ""; if (host.equalsIgnoreCase(from) || !ModelUtil.hasLength(from)) { showAlert((Message)packet); } } } }); }
public void processPacket(final Packet packet) { SwingUtilities.invokeLater(new Runnable() { public void run() { final Message message = (Message)packet; boolean broadcast = message.getProperty("broadcast") != null; if ((broadcast || (message.getType() == Message.Type.NORMAL) || message.getType() == Message.Type.HEADLINE) && message.getBody() != null) { showAlert((Message)packet); } else { String host = SparkManager.getSessionManager().getServerAddress(); String from = packet.getFrom() != null ? packet.getFrom() : ""; if (host.equalsIgnoreCase(from) || !ModelUtil.hasLength(from)) { showAlert((Message)packet); } } } }); }
3,236,822
public void run() { final Message message = (Message)packet; boolean broadcast = message.getProperty("broadcast") != null; if ((broadcast || message.getType() == Message.Type.NORMAL) && message.getBody() != null) { showAlert((Message)packet); } else { String host = SparkManager.getSessionManager().getServerAddress(); String from = packet.getFrom() != null ? packet.getFrom() : ""; if (host.equalsIgnoreCase(from) || !ModelUtil.hasLength(from)) { showAlert((Message)packet); } } }
public void run() { final Message message = (Message)packet; boolean broadcast = message.getProperty("broadcast") != null; if ((broadcast || (message.getType() == Message.Type.NORMAL) || message.getType() == Message.Type.HEADLINE) && message.getBody() != null) { showAlert((Message)packet); } else { String host = SparkManager.getSessionManager().getServerAddress(); String from = packet.getFrom() != null ? packet.getFrom() : ""; if (host.equalsIgnoreCase(from) || !ModelUtil.hasLength(from)) { showAlert((Message)packet); } } }
3,236,823
public void testXMLReportValidity() throws Exception { String[] args; // Serialize the current coverage data to disk ProjectData.saveGlobalProjectData(); String dataFileName = CoverageDataFileHandler.getDefaultDataFile() .getAbsolutePath(); // Then we need to generate the XML report args = new String[] { "--format", "xml", "--datafile", dataFileName, "--destination", pathToTestOutput, "--source", pathToSourceCode }; net.sourceforge.cobertura.reporting.Main.main(args); // Create a validating XML document parser DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(true); DocumentBuilder documentBuilder = factory.newDocumentBuilder(); documentBuilder.setEntityResolver(new JUnitXMLParserEntityResolver( basedir)); documentBuilder.setErrorHandler(new JUnitXMLParserErrorHandler()); // Parse the XML report InputStream inputStream = null; try { inputStream = new FileInputStream(pathToXMLReport); documentBuilder.parse(inputStream); } finally { if (inputStream != null) inputStream.close(); } }
public void testXMLReportValidity() throws Exception { String[] args; // Serialize the current coverage data to disk ProjectData.saveGlobalProjectData(); String dataFileName = CoverageDataFileHandler.getDefaultDataFile() .getAbsolutePath(); // Then we need to generate the XML report args = new String[] { "--format", "xml", "--datafile", dataFileName, "--destination", pathToTestOutput, "--source", pathToSourceCode }; net.sourceforge.cobertura.reporting.Main.main(args); // Create a validating XML document parser DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(true); DocumentBuilder documentBuilder = factory.newDocumentBuilder(); documentBuilder.setEntityResolver(new JUnitXMLParserEntityResolver( basedir)); documentBuilder.setErrorHandler(new JUnitXMLParserErrorHandler()); // Parse the XML report InputStream inputStream = null; try { inputStream = new FileInputStream(pathToXMLReport); documentBuilder.parse(inputStream); } finally { if (inputStream != null) inputStream.close(); } }
3,236,824
public void finished() { if (data != null) { searchResults.showUsersFound(data); } else { JOptionPane.showMessageDialog(searchResults, Res.getString("message.no.results.found"), Res.getString("title.notification"), JOptionPane.ERROR_MESSAGE); } }
publicvoidfinished(){if(data!=null){searchResults.showUsersFound(data);}else{JOptionPane.showMessageDialog(searchResults,Res.getString("message.no.results.found"),Res.getString("title.notification"),JOptionPane.ERROR_MESSAGE);}}
3,236,825
public byte[] calculateMessageDigest() { errorIfNotLoaded(); try { return buffer.calculateMessageDigest(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public byte[] calculateMessageDigest() { errorIfNotLoaded(); try { return buffer.calculateMessageDigest(); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,826
public byte[] calculateMessageDigest() { errorIfNotLoaded(); try { return buffer.calculateMessageDigest(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public byte[] calculateMessageDigest() { errorIfNotLoaded(); try { return buffer.calculateMessageDigest(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,827
public byte[] getPlane(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); MappedByteBuffer plane; try { plane = buffer.getPlane(arg0, arg1, arg2); } catch (Exception e) { throw new RuntimeException(e); } return bufferAsByteArrayWithExceptionIfNull( plane ); }
public byte[] getPlane(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); MappedByteBuffer plane; try { plane = buffer.getPlane(arg0, arg1, arg2); } catch (Exception e) { throw new RuntimeException(e); } return bufferAsByteArrayWithExceptionIfNull( plane ); }
3,236,829
public byte[] getPlane(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); MappedByteBuffer plane; try { plane = buffer.getPlane(arg0, arg1, arg2); } catch (Exception e) { throw new RuntimeException(e); } return bufferAsByteArrayWithExceptionIfNull( plane ); }
public byte[] getPlane(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); MappedByteBuffer plane; try { plane = buffer.getPlane(arg0, arg1, arg2); } catch (Exception e) { throw new RuntimeException(e); } return bufferAsByteArrayWithExceptionIfNull( plane ); }
3,236,830
public byte[] getPlane(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); MappedByteBuffer plane; try { plane = buffer.getPlane(arg0, arg1, arg2); } catch (Exception e) { throw new RuntimeException(e); } return bufferAsByteArrayWithExceptionIfNull( plane ); }
public byte[] getPlane(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); MappedByteBuffer plane; try { plane = buffer.getPlane(arg0, arg1, arg2); } catch (Exception e) { throw new RuntimeException(e); } return bufferAsByteArrayWithExceptionIfNull(plane); }
3,236,831
public Long getPlaneOffset(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); try { return buffer.getPlaneOffset(arg0, arg1, arg2); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public Long getPlaneOffset(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); try { return buffer.getPlaneOffset(arg0, arg1, arg2); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,832
public Long getPlaneOffset(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); try { return buffer.getPlaneOffset(arg0, arg1, arg2); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public Long getPlaneOffset(Integer arg0, Integer arg1, Integer arg2) { errorIfNotLoaded(); try { return buffer.getPlaneOffset(arg0, arg1, arg2); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,833
public byte[] getRegion(Integer arg0, Long arg1) { errorIfNotLoaded(); MappedByteBuffer region; try { region = buffer.getRegion(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( region ); }
public byte[] getRegion(Integer arg0, Long arg1) { errorIfNotLoaded(); MappedByteBuffer region = null; try { region = buffer.getRegion(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( region ); }
3,236,835
public byte[] getRegion(Integer arg0, Long arg1) { errorIfNotLoaded(); MappedByteBuffer region; try { region = buffer.getRegion(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( region ); }
public byte[] getRegion(Integer arg0, Long arg1) { errorIfNotLoaded(); MappedByteBuffer region; try { region = buffer.getRegion(arg0, arg1); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( region ); }
3,236,836
public byte[] getRegion(Integer arg0, Long arg1) { errorIfNotLoaded(); MappedByteBuffer region; try { region = buffer.getRegion(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( region ); }
public byte[] getRegion(Integer arg0, Long arg1) { errorIfNotLoaded(); MappedByteBuffer region; try { region = buffer.getRegion(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( region ); }
3,236,837
public byte[] getRegion(Integer arg0, Long arg1) { errorIfNotLoaded(); MappedByteBuffer region; try { region = buffer.getRegion(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( region ); }
public byte[] getRegion(Integer arg0, Long arg1) { errorIfNotLoaded(); MappedByteBuffer region; try { region = buffer.getRegion(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull(region); }
3,236,838
public byte[] getRow(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); MappedByteBuffer row; try { row = buffer.getRow(arg0, arg1, arg2, arg3); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( row ); }
public byte[] getRow(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); MappedByteBuffer row = null; try { row = buffer.getRow(arg0, arg1, arg2, arg3); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( row ); }
3,236,839
public byte[] getRow(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); MappedByteBuffer row; try { row = buffer.getRow(arg0, arg1, arg2, arg3); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( row ); }
public byte[] getRow(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); MappedByteBuffer row; try { row = buffer.getRow(arg0, arg1, arg2, arg3); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( row ); }
3,236,840
public byte[] getRow(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); MappedByteBuffer row; try { row = buffer.getRow(arg0, arg1, arg2, arg3); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( row ); }
public byte[] getRow(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); MappedByteBuffer row; try { row = buffer.getRow(arg0, arg1, arg2, arg3); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( row ); }
3,236,841
public Long getRowOffset(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { return buffer.getRowOffset(arg0, arg1, arg2, arg3); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public Long getRowOffset(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { return buffer.getRowOffset(arg0, arg1, arg2, arg3); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,842
public Long getRowOffset(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { return buffer.getRowOffset(arg0, arg1, arg2, arg3); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public Long getRowOffset(Integer arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { return buffer.getRowOffset(arg0, arg1, arg2, arg3); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,843
public byte[] getStack(Integer arg0, Integer arg1) { errorIfNotLoaded(); MappedByteBuffer stack; try { stack = buffer.getStack(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( stack ); }
public byte[] getStack(Integer arg0, Integer arg1) { errorIfNotLoaded(); MappedByteBuffer stack = null; try { stack = buffer.getStack(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( stack ); }
3,236,845
public byte[] getStack(Integer arg0, Integer arg1) { errorIfNotLoaded(); MappedByteBuffer stack; try { stack = buffer.getStack(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( stack ); }
public byte[] getStack(Integer arg0, Integer arg1) { errorIfNotLoaded(); MappedByteBuffer stack; try { stack = buffer.getStack(arg0, arg1); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( stack ); }
3,236,846
public byte[] getStack(Integer arg0, Integer arg1) { errorIfNotLoaded(); MappedByteBuffer stack; try { stack = buffer.getStack(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( stack ); }
public byte[] getStack(Integer arg0, Integer arg1) { errorIfNotLoaded(); MappedByteBuffer stack; try { stack = buffer.getStack(arg0, arg1); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( stack ); }
3,236,847
public Long getStackOffset(Integer arg0, Integer arg1) { errorIfNotLoaded(); try { return buffer.getStackOffset(arg0, arg1); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public Long getStackOffset(Integer arg0, Integer arg1) { errorIfNotLoaded(); try { return buffer.getStackOffset(arg0, arg1); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,848
public Long getStackOffset(Integer arg0, Integer arg1) { errorIfNotLoaded(); try { return buffer.getStackOffset(arg0, arg1); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public Long getStackOffset(Integer arg0, Integer arg1) { errorIfNotLoaded(); try { return buffer.getStackOffset(arg0, arg1); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,849
public byte[] getTimepoint(Integer arg0) { errorIfNotLoaded(); MappedByteBuffer timepoint; try { timepoint = buffer.getTimepoint(arg0); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( timepoint ); }
public byte[] getTimepoint(Integer arg0) { errorIfNotLoaded(); MappedByteBuffer timepoint = null; try { timepoint = buffer.getTimepoint(arg0); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( timepoint ); }
3,236,851
public byte[] getTimepoint(Integer arg0) { errorIfNotLoaded(); MappedByteBuffer timepoint; try { timepoint = buffer.getTimepoint(arg0); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( timepoint ); }
public byte[] getTimepoint(Integer arg0) { errorIfNotLoaded(); MappedByteBuffer timepoint; try { timepoint = buffer.getTimepoint(arg0); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( timepoint ); }
3,236,852
public byte[] getTimepoint(Integer arg0) { errorIfNotLoaded(); MappedByteBuffer timepoint; try { timepoint = buffer.getTimepoint(arg0); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( timepoint ); }
public byte[] getTimepoint(Integer arg0) { errorIfNotLoaded(); MappedByteBuffer timepoint; try { timepoint = buffer.getTimepoint(arg0); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( timepoint ); }
3,236,853
public byte[] getTimepoint(Integer arg0) { errorIfNotLoaded(); MappedByteBuffer timepoint; try { timepoint = buffer.getTimepoint(arg0); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull( timepoint ); }
public byte[] getTimepoint(Integer arg0) { errorIfNotLoaded(); MappedByteBuffer timepoint; try { timepoint = buffer.getTimepoint(arg0); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } return bufferAsByteArrayWithExceptionIfNull(timepoint); }
3,236,854
public Long getTimepointOffset(Integer arg0) { errorIfNotLoaded(); try { return buffer.getTimepointOffset(arg0); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public Long getTimepointOffset(Integer arg0) { errorIfNotLoaded(); try { return buffer.getTimepointOffset(arg0); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,855
public Long getTimepointOffset(Integer arg0) { errorIfNotLoaded(); try { return buffer.getTimepointOffset(arg0); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public Long getTimepointOffset(Integer arg0) { errorIfNotLoaded(); try { return buffer.getTimepointOffset(arg0); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,856
public void setPlane(byte[] arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { buffer.setPlane(arg0, arg1, arg2, arg3); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public void setPlane(byte[] arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { buffer.setPlane(arg0, arg1, arg2, arg3); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,858
public void setPlane(byte[] arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { buffer.setPlane(arg0, arg1, arg2, arg3); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public void setPlane(byte[] arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { buffer.setPlane(arg0, arg1, arg2, arg3); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,859
public void setRegion(Integer arg0, Long arg1, byte[] arg2) { errorIfNotLoaded(); try { buffer.setRegion(arg0, arg1, arg2); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public void setRegion(Integer arg0, Long arg1, byte[] arg2) { errorIfNotLoaded(); try { buffer.setRegion(arg0, arg1, arg2); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,860
public void setRegion(Integer arg0, Long arg1, byte[] arg2) { errorIfNotLoaded(); try { buffer.setRegion(arg0, arg1, arg2); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public void setRegion(Integer arg0, Long arg1, byte[] arg2) { errorIfNotLoaded(); try { buffer.setRegion(arg0, arg1, arg2); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,861
public void setRow(byte[] arg0, Integer arg1, Integer arg2, Integer arg3, Integer arg4) { errorIfNotLoaded(); // FIXME buffer.setRow(arg0, arg1, arg2, arg3, arg4); throw new RuntimeException("Not implemented yet."); }
public void setRow(byte[] arg0, Integer arg1, Integer arg2, Integer arg3, Integer arg4) { errorIfNotLoaded(); // FIXME buffer.setRow(arg0, arg1, arg2, arg3, arg4); try { ByteBuffer buf = ByteBuffer.wrap(arg0); buffer.setRow(buf, arg1, arg2, arg3, arg4); } catch (Exception e) { handleException(e); } }
3,236,862
public void setStack(byte[] arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { buffer.setStack(arg0, arg1, arg2, arg3); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public void setStack(byte[] arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { buffer.setStack(arg0, arg1, arg2, arg3); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,863
public void setStack(byte[] arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { buffer.setStack(arg0, arg1, arg2, arg3); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public void setStack(byte[] arg0, Integer arg1, Integer arg2, Integer arg3) { errorIfNotLoaded(); try { buffer.setStack(arg0, arg1, arg2, arg3); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,864
public void setTimepoint(byte[] arg0, Integer arg1) { errorIfNotLoaded(); try { buffer.setTimepoint(arg0, arg1); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public void setTimepoint(byte[] arg0, Integer arg1) { errorIfNotLoaded(); try { buffer.setTimepoint(arg0, arg1); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,865
public void setTimepoint(byte[] arg0, Integer arg1) { errorIfNotLoaded(); try { buffer.setTimepoint(arg0, arg1); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
public void setTimepoint(byte[] arg0, Integer arg1) { errorIfNotLoaded(); try { buffer.setTimepoint(arg0, arg1); } catch (BufferOverflowException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } catch (DimensionsOutOfBoundsException e) { e.printStackTrace(); throw new RuntimeException("Unimplemented exception."); } }
3,236,866
private void handleDisplayViewerRelatedAgents(DisplayViewerRelatedAgent response) { if (response.isOnOff()) presentation.deIconify(); else { if (presentation != null) removePresentation(); } }
private void handleDisplayViewerRelatedAgents(DisplayViewerRelatedAgent response) { if (response.isOnOff()) presentation.deIconify(); else { if (presentation != null) removePresentation(); } }
3,236,867
private void buildTreeNode(TreeImageDisplay parent, Collection nodes, DefaultTreeModel tm) { if (nodes.size() == 0) { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), parent, parent.getChildCount()); return; } Iterator i = nodes.iterator(); TreeImageDisplay display; Set children; parent.removeAllChildren(); List expanded = new ArrayList(); while (i.hasNext()) { display = (TreeImageDisplay) i.next(); tm.insertNodeInto(display, parent, parent.getChildCount()); if (display instanceof TreeImageSet) { children = display.getChildrenDisplay(); if (children.size() != 0) { if (display.containsImages()) { expanded.add(display); display.setExpanded(true); setExpandedParent(display, false); buildTreeNode(display, sorter.sort(children), tm); expandNode(display); tm.reload(display); } else { buildTreeNode(display, sorter.sort(children), tm); } } else { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), display, display.getChildCount()); } } else reloadRoot = false; } if (parent.isExpanded()) { expandNode(parent); tm.reload(parent); } }
private void buildTreeNode(TreeImageDisplay parent, Collection nodes, DefaultTreeModel tm) { if (nodes.size() == 0) { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), parent, parent.getChildCount()); return; } Iterator i = nodes.iterator(); TreeImageDisplay display; Set children; parent.removeAllChildren(); while (i.hasNext()) { display = (TreeImageDisplay) i.next(); tm.insertNodeInto(display, parent, parent.getChildCount()); if (display instanceof TreeImageSet) { children = display.getChildrenDisplay(); if (children.size() != 0) { if (display.containsImages()) { expanded.add(display); display.setExpanded(true); setExpandedParent(display, false); buildTreeNode(display, sorter.sort(children), tm); expandNode(display); tm.reload(display); } else { buildTreeNode(display, sorter.sort(children), tm); } } else { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), display, display.getChildCount()); } } else reloadRoot = false; } if (parent.isExpanded()) { expandNode(parent); tm.reload(parent); } }
3,236,869
private void buildTreeNode(TreeImageDisplay parent, Collection nodes, DefaultTreeModel tm) { if (nodes.size() == 0) { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), parent, parent.getChildCount()); return; } Iterator i = nodes.iterator(); TreeImageDisplay display; Set children; parent.removeAllChildren(); List expanded = new ArrayList(); while (i.hasNext()) { display = (TreeImageDisplay) i.next(); tm.insertNodeInto(display, parent, parent.getChildCount()); if (display instanceof TreeImageSet) { children = display.getChildrenDisplay(); if (children.size() != 0) { if (display.containsImages()) { expanded.add(display); display.setExpanded(true); setExpandedParent(display, false); buildTreeNode(display, sorter.sort(children), tm); expandNode(display); tm.reload(display); } else { buildTreeNode(display, sorter.sort(children), tm); } } else { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), display, display.getChildCount()); } } else reloadRoot = false; } if (parent.isExpanded()) { expandNode(parent); tm.reload(parent); } }
private void buildTreeNode(TreeImageDisplay parent, Collection nodes, DefaultTreeModel tm) { if (nodes.size() == 0) { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), parent, parent.getChildCount()); return; } Iterator i = nodes.iterator(); TreeImageDisplay display; Set children; parent.removeAllChildren(); List expanded = new ArrayList(); while (i.hasNext()) { display = (TreeImageDisplay) i.next(); tm.insertNodeInto(display, parent, parent.getChildCount()); if (display instanceof TreeImageSet) { children = display.getChildrenDisplay(); if (children.size() != 0) { if (display.containsImages()) { display.setExpanded(true); setExpandedParent(display, false); buildTreeNode(display, sorter.sort(children), tm); expandNode(display); tm.reload(display); } else { buildTreeNode(display, sorter.sort(children), tm); } } else { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), display, display.getChildCount()); } } else reloadRoot = false; } if (parent.isExpanded()) { expandNode(parent); tm.reload(parent); } }
3,236,870
private void buildTreeNode(TreeImageDisplay parent, Collection nodes, DefaultTreeModel tm) { if (nodes.size() == 0) { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), parent, parent.getChildCount()); return; } Iterator i = nodes.iterator(); TreeImageDisplay display; Set children; parent.removeAllChildren(); List expanded = new ArrayList(); while (i.hasNext()) { display = (TreeImageDisplay) i.next(); tm.insertNodeInto(display, parent, parent.getChildCount()); if (display instanceof TreeImageSet) { children = display.getChildrenDisplay(); if (children.size() != 0) { if (display.containsImages()) { expanded.add(display); display.setExpanded(true); setExpandedParent(display, false); buildTreeNode(display, sorter.sort(children), tm); expandNode(display); tm.reload(display); } else { buildTreeNode(display, sorter.sort(children), tm); } } else { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), display, display.getChildCount()); } } else reloadRoot = false; } if (parent.isExpanded()) { expandNode(parent); tm.reload(parent); } }
private void buildTreeNode(TreeImageDisplay parent, Collection nodes, DefaultTreeModel tm) { if (nodes.size() == 0) { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), parent, parent.getChildCount()); return; } Iterator i = nodes.iterator(); TreeImageDisplay display; Set children; parent.removeAllChildren(); List expanded = new ArrayList(); while (i.hasNext()) { display = (TreeImageDisplay) i.next(); tm.insertNodeInto(display, parent, parent.getChildCount()); if (display instanceof TreeImageSet) { children = display.getChildrenDisplay(); if (children.size() != 0) { if (display.containsImages()) { expanded.add(display); display.setExpanded(true); setExpandedParent(display, false); buildTreeNode(display, sorter.sort(children), tm); expandNode(display); tm.reload(display); } else { buildTreeNode(display, sorter.sort(children), tm); } } else { tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG), display, display.getChildCount()); } } } if (parent.isExpanded()) { expandNode(parent); tm.reload(parent); } }
3,236,871
void clearTree() { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.removeAllChildrenDisplay(); buildEmptyNode(root); dtm.reload(); collapsePath(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
void clearTree() { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.removeAllChildrenDisplay(); buildEmptyNode(root); dtm.reload(); collapsePath(root); if (!model.isMainTree()) loadGoIntoTree(); }
3,236,872
private void loadGoIntoTree() { DefaultTreeModel dtm = (DefaultTreeModel) goIntoTree.getModel(); DefaultMutableTreeNode r = (DefaultMutableTreeNode) dtm.getRoot(); TreeImageDisplay d = model.getLastSelectedDisplay(); r.removeAllChildren(); TreeImageDisplay copy = d.copy(); dtm.insertNodeInto(copy, r, r.getChildCount()); buildTreeNode(copy, sorter.sort(copy.getChildrenDisplay()), dtm); reloadRoot = true; dtm.reload(r); if (copy.isChildrenLoaded()) expandGoIntoTreeNode(copy); scrollPane.getViewport().removeAll(); scrollPane.getViewport().add(goIntoTree); repaint(); }
private void loadGoIntoTree() { DefaultTreeModel dtm = (DefaultTreeModel) goIntoTree.getModel(); DefaultMutableTreeNode r = (DefaultMutableTreeNode) dtm.getRoot(); TreeImageDisplay d = model.getLastSelectedDisplay(); r.removeAllChildren(); TreeImageDisplay copy = d.copy(); dtm.insertNodeInto(copy, r, r.getChildCount()); buildTreeNode(copy, sorter.sort(copy.getChildrenDisplay()), dtm); dtm.reload(r); if (copy.isChildrenLoaded()) expandGoIntoTreeNode(copy); scrollPane.getViewport().removeAll(); scrollPane.getViewport().add(goIntoTree); repaint(); }
3,236,873
void removeNodes(List nodes, TreeImageDisplay parentDisplay) { if (parentDisplay == null) parentDisplay = getTreeRoot(); Iterator i = nodes.iterator(); TreeImageDisplay node; TreeImageDisplay parent; DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); while (i.hasNext()) { node = (TreeImageDisplay) i.next(); parent = node.getParentDisplay(); if (parent.isChildrenLoaded()) { parent.removeChildDisplay(node); parent.remove(node); dtm.reload(parent); if (parent.equals(parentDisplay)) treeDisplay.setSelectionPath( new TreePath(parent.getPath())); } } //if (reloadRoot) dtm.reload(getTreeRoot()); if (!model.isMainTree()) loadGoIntoTree(); }
voidremoveNodes(Listnodes,TreeImageDisplayparentDisplay){if(parentDisplay==null)parentDisplay=getTreeRoot();Iteratori=nodes.iterator();TreeImageDisplaynode;TreeImageDisplayparent;DefaultTreeModeldtm=(DefaultTreeModel)treeDisplay.getModel();while(i.hasNext()){node=(TreeImageDisplay)i.next();parent=node.getParentDisplay();if(parent.isChildrenLoaded()){parent.removeChildDisplay(node);parent.remove(node);dtm.reload(parent);if(parent.equals(parentDisplay))treeDisplay.setSelectionPath(newTreePath(parent.getPath()));}}//if(reloadRoot)dtm.reload(getTreeRoot());if(!model.isMainTree())loadGoIntoTree();}
3,236,874
void selectFoundNode(TreeImageDisplay node) { TreePath path = new TreePath(node.getPath()); treeDisplay.setSelectionPath(path); TreeCellRenderer renderer = (TreeCellRenderer) treeDisplay.getCellRenderer(); //treeDisplay.requestFocus(); renderer.getTreeCellRendererComponent(treeDisplay, node, treeDisplay.isPathSelected(path), false, true, 0, false); if (!model.isMainTree()) { loadGoIntoTree(); selectGoIntoTreeFoundNode(node); } reloadRoot = true; }
void selectFoundNode(TreeImageDisplay node) { TreePath path = new TreePath(node.getPath()); treeDisplay.setSelectionPath(path); TreeCellRenderer renderer = (TreeCellRenderer) treeDisplay.getCellRenderer(); //treeDisplay.requestFocus(); renderer.getTreeCellRendererComponent(treeDisplay, node, treeDisplay.isPathSelected(path), false, true, 0, false); if (!model.isMainTree()) { loadGoIntoTree(); selectGoIntoTreeFoundNode(node); } }
3,236,875
void setLeavesViews(Set nodes, TreeImageSet parent) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); parent.removeAllChildren(); parent.setChildrenLoaded(Boolean.TRUE); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) parent.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(parent, sorter.sort(nodes), dtm); } else buildEmptyNode(parent); dtm.reload(parent); reloadRoot = true; if (!model.isMainTree()) loadGoIntoTree(); }
void setLeavesViews(Set nodes, TreeImageSet parent) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); parent.removeAllChildren(); parent.setChildrenLoaded(Boolean.TRUE); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) parent.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(parent, sorter.sort(nodes), dtm); } else buildEmptyNode(parent); dtm.reload(parent); if (!model.isMainTree()) loadGoIntoTree(); }
3,236,876
void setSortedNodes(List nodes, TreeImageDisplay parentNode) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); parentNode.removeAllChildren(); Iterator i = nodes.iterator(); boolean b = (parentNode.equals(dtm.getRoot())); TreeImageDisplay child; while (i.hasNext()) { child = (TreeImageDisplay) i.next(); if (b) parentNode.addChildDisplay(child); dtm.insertNodeInto(child, parentNode, parentNode.getChildCount()); } dtm.reload(parentNode); expandNode(parentNode); if (!model.isMainTree()) { i = nodes.iterator(); List copies = new ArrayList(nodes.size()); while (i.hasNext()) { copies.add(((TreeImageDisplay) i.next()).copy()); } dtm = (DefaultTreeModel) goIntoTree.getModel(); DefaultMutableTreeNode r = (DefaultMutableTreeNode) dtm.getRoot(); TreeImageDisplay d = model.getLastSelectedDisplay(); r.removeAllChildren(); TreeImageDisplay copy = d.copy(); dtm.insertNodeInto(copy, r, r.getChildCount()); buildTreeNode(copy, copies, dtm); reloadRoot = true; dtm.reload(r); if (copy.isChildrenLoaded()) expandGoIntoTreeNode(copy); scrollPane.getViewport().removeAll(); scrollPane.getViewport().add(goIntoTree); repaint(); } reloadRoot = true; }
void setSortedNodes(List nodes, TreeImageDisplay parentNode) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); parentNode.removeAllChildren(); Iterator i = nodes.iterator(); boolean b = (parentNode.equals(dtm.getRoot())); TreeImageDisplay child; while (i.hasNext()) { child = (TreeImageDisplay) i.next(); if (b) parentNode.addChildDisplay(child); dtm.insertNodeInto(child, parentNode, parentNode.getChildCount()); } dtm.reload(parentNode); expandNode(parentNode); if (!model.isMainTree()) { i = nodes.iterator(); List copies = new ArrayList(nodes.size()); while (i.hasNext()) { copies.add(((TreeImageDisplay) i.next()).copy()); } dtm = (DefaultTreeModel) goIntoTree.getModel(); DefaultMutableTreeNode r = (DefaultMutableTreeNode) dtm.getRoot(); TreeImageDisplay d = model.getLastSelectedDisplay(); r.removeAllChildren(); TreeImageDisplay copy = d.copy(); dtm.insertNodeInto(copy, r, r.getChildCount()); buildTreeNode(copy, copies, dtm); dtm.reload(r); if (copy.isChildrenLoaded()) expandGoIntoTreeNode(copy); scrollPane.getViewport().removeAll(); scrollPane.getViewport().add(goIntoTree); repaint(); } }
3,236,877
void setSortedNodes(List nodes, TreeImageDisplay parentNode) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); parentNode.removeAllChildren(); Iterator i = nodes.iterator(); boolean b = (parentNode.equals(dtm.getRoot())); TreeImageDisplay child; while (i.hasNext()) { child = (TreeImageDisplay) i.next(); if (b) parentNode.addChildDisplay(child); dtm.insertNodeInto(child, parentNode, parentNode.getChildCount()); } dtm.reload(parentNode); expandNode(parentNode); if (!model.isMainTree()) { i = nodes.iterator(); List copies = new ArrayList(nodes.size()); while (i.hasNext()) { copies.add(((TreeImageDisplay) i.next()).copy()); } dtm = (DefaultTreeModel) goIntoTree.getModel(); DefaultMutableTreeNode r = (DefaultMutableTreeNode) dtm.getRoot(); TreeImageDisplay d = model.getLastSelectedDisplay(); r.removeAllChildren(); TreeImageDisplay copy = d.copy(); dtm.insertNodeInto(copy, r, r.getChildCount()); buildTreeNode(copy, copies, dtm); reloadRoot = true; dtm.reload(r); if (copy.isChildrenLoaded()) expandGoIntoTreeNode(copy); scrollPane.getViewport().removeAll(); scrollPane.getViewport().add(goIntoTree); repaint(); } reloadRoot = true; }
void setSortedNodes(List nodes, TreeImageDisplay parentNode) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); parentNode.removeAllChildren(); Iterator i = nodes.iterator(); boolean b = (parentNode.equals(dtm.getRoot())); TreeImageDisplay child; while (i.hasNext()) { child = (TreeImageDisplay) i.next(); if (b) parentNode.addChildDisplay(child); dtm.insertNodeInto(child, parentNode, parentNode.getChildCount()); } dtm.reload(parentNode); expandNode(parentNode); if (!model.isMainTree()) { i = nodes.iterator(); List copies = new ArrayList(nodes.size()); while (i.hasNext()) { copies.add(((TreeImageDisplay) i.next()).copy()); } dtm = (DefaultTreeModel) goIntoTree.getModel(); DefaultMutableTreeNode r = (DefaultMutableTreeNode) dtm.getRoot(); TreeImageDisplay d = model.getLastSelectedDisplay(); r.removeAllChildren(); TreeImageDisplay copy = d.copy(); dtm.insertNodeInto(copy, r, r.getChildCount()); buildTreeNode(copy, copies, dtm); dtm.reload(r); if (copy.isChildrenLoaded()) expandGoIntoTreeNode(copy); scrollPane.getViewport().removeAll(); scrollPane.getViewport().add(goIntoTree); repaint(); } }
3,236,878
void setViews(Set nodes) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.setChildrenLoaded(Boolean.TRUE); root.setExpanded(true); dtm.reload(); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) root.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(root, sorter.sort(nodes), (DefaultTreeModel) treeDisplay.getModel()); //if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
voidsetViews(Setnodes){DefaultTreeModeldtm=(DefaultTreeModel)treeDisplay.getModel();TreeImageDisplayroot=(TreeImageDisplay)dtm.getRoot();root.removeAllChildren();root.setChildrenLoaded(Boolean.TRUE);root.setExpanded(true);dtm.reload();if(nodes.size()!=0){Iteratori=nodes.iterator();while(i.hasNext())root.addChildDisplay((TreeImageDisplay)i.next());buildTreeNode(root,sorter.sort(nodes),(DefaultTreeModel)treeDisplay.getModel());//if(!reload)reload=reloadRoot;}elsebuildEmptyNode(root);//if(reload)dtm.reload(root);if(!model.isMainTree())loadGoIntoTree();reloadRoot=true;}
3,236,879
void setViews(Set nodes) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.setChildrenLoaded(Boolean.TRUE); root.setExpanded(true); dtm.reload(); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) root.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(root, sorter.sort(nodes), (DefaultTreeModel) treeDisplay.getModel()); //if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
voidsetViews(Setnodes){DefaultTreeModeldtm=(DefaultTreeModel)treeDisplay.getModel();TreeImageDisplayroot=(TreeImageDisplay)dtm.getRoot();root.removeAllChildren();root.setChildrenLoaded(Boolean.TRUE);root.setExpanded(true);dtm.reload();if(nodes.size()!=0){Iteratori=nodes.iterator();while(i.hasNext())root.addChildDisplay((TreeImageDisplay)i.next());buildTreeNode(root,sorter.sort(nodes),(DefaultTreeModel)treeDisplay.getModel());//if(!reload)reload=reloadRoot;}elsebuildEmptyNode(root);//if(reload)dtm.reload(root);if(!model.isMainTree())loadGoIntoTree();reloadRoot=true;}
3,236,880
void setViews(Set nodes) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.setChildrenLoaded(Boolean.TRUE); root.setExpanded(true); dtm.reload(); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) root.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(root, sorter.sort(nodes), (DefaultTreeModel) treeDisplay.getModel()); //if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
voidsetViews(Setnodes){DefaultTreeModeldtm=(DefaultTreeModel)treeDisplay.getModel();TreeImageDisplayroot=(TreeImageDisplay)dtm.getRoot();root.removeAllChildren();root.setChildrenLoaded(Boolean.TRUE);root.setExpanded(true);dtm.reload();if(nodes.size()!=0){Iteratori=nodes.iterator();while(i.hasNext())root.addChildDisplay((TreeImageDisplay)i.next());buildTreeNode(root,sorter.sort(nodes),(DefaultTreeModel)treeDisplay.getModel());//if(!reload)reload=reloadRoot;}elsebuildEmptyNode(root);//if(reload)dtm.reload(root);if(!model.isMainTree())loadGoIntoTree();reloadRoot=true;}
3,236,881
void setViews(Set nodes) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.setChildrenLoaded(Boolean.TRUE); root.setExpanded(true); dtm.reload(); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) root.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(root, sorter.sort(nodes), (DefaultTreeModel) treeDisplay.getModel()); //if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
void setViews(Set nodes) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.setChildrenLoaded(Boolean.TRUE); root.setExpanded(true); dtm.reload(); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) root.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(root, sorter.sort(nodes), (DefaultTreeModel) treeDisplay.getModel()); //if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); Iterator j = nodesToReset.iterator(); while (j.hasNext()) { setExpandedParent((TreeImageDisplay) j.next(), true); } }
3,236,882
void sortNodes(int type) { sorter.setByDate(type == Browser.SORT_NODES_BY_DATE); DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); boolean reload = false; Set children = root.getChildrenDisplay(); root.removeAllChildren(); dtm.reload(root); if (children.size() != 0) { buildTreeNode(root, sorter.sort(children), dtm); if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
void sortNodes(int type) { sorter.setByDate(type == Browser.SORT_NODES_BY_DATE); DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); Set children = root.getChildrenDisplay(); root.removeAllChildren(); dtm.reload(root); if (children.size() != 0) { buildTreeNode(root, sorter.sort(children), dtm); if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
3,236,883
void sortNodes(int type) { sorter.setByDate(type == Browser.SORT_NODES_BY_DATE); DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); boolean reload = false; Set children = root.getChildrenDisplay(); root.removeAllChildren(); dtm.reload(root); if (children.size() != 0) { buildTreeNode(root, sorter.sort(children), dtm); if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
void sortNodes(int type) { sorter.setByDate(type == Browser.SORT_NODES_BY_DATE); DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); boolean reload = false; Set children = root.getChildrenDisplay(); root.removeAllChildren(); dtm.reload(root); if (children.size() != 0) { buildTreeNode(root, sorter.sort(children), dtm); } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
3,236,884
void sortNodes(int type) { sorter.setByDate(type == Browser.SORT_NODES_BY_DATE); DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); boolean reload = false; Set children = root.getChildrenDisplay(); root.removeAllChildren(); dtm.reload(root); if (children.size() != 0) { buildTreeNode(root, sorter.sort(children), dtm); if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
voidsortNodes(inttype){sorter.setByDate(type==Browser.SORT_NODES_BY_DATE);DefaultTreeModeldtm=(DefaultTreeModel)treeDisplay.getModel();TreeImageDisplayroot=(TreeImageDisplay)dtm.getRoot();booleanreload=false;Setchildren=root.getChildrenDisplay();root.removeAllChildren();dtm.reload(root);if(children.size()!=0){buildTreeNode(root,sorter.sort(children),dtm);if(!reload)reload=reloadRoot;}elsebuildEmptyNode(root);//if(reload)dtm.reload(root);if(!model.isMainTree())loadGoIntoTree();reloadRoot=true;}
3,236,885
void sortNodes(int type) { sorter.setByDate(type == Browser.SORT_NODES_BY_DATE); DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); boolean reload = false; Set children = root.getChildrenDisplay(); root.removeAllChildren(); dtm.reload(root); if (children.size() != 0) { buildTreeNode(root, sorter.sort(children), dtm); if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); reloadRoot = true; }
void sortNodes(int type) { sorter.setByDate(type == Browser.SORT_NODES_BY_DATE); DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); boolean reload = false; Set children = root.getChildrenDisplay(); root.removeAllChildren(); dtm.reload(root); if (children.size() != 0) { buildTreeNode(root, sorter.sort(children), dtm); if (!reload) reload = reloadRoot; } else buildEmptyNode(root); //if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); Iterator j = nodesToReset.iterator(); while (j.hasNext()) { setExpandedParent((TreeImageDisplay) j.next(), true); } }
3,236,886
public void actionPerformed(ActionEvent e) { int index = Integer.parseInt(e.getActionCommand()); try { switch (index) { case SAVE: mng.saveResult(); break; case GRAPHIC: showGraphicSelection(); break; case BACK_TO_TABLE: mng.backToTable(); break; case BACK_TO_GRAPHIC: mng.backToGraphic(); break; case BACKGROUND: showROISelector(StatsResultsPaneMng.TABLE_BACKGROUND, "Background"); break; case RATIO: showROISelector(StatsResultsPaneMng.TABLE_RATIO, "Ratio"); break; case INITIAL: view.setEnabledMoveButtons(false); mng.displayInitialData(); break; } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
public void actionPerformed(ActionEvent e) { int index = Integer.parseInt(e.getActionCommand()); try { switch (index) { case SAVE: mng.saveResult(); break; case GRAPHIC: mng.showGraphicSelection(); break; case BACK_TO_TABLE: mng.backToTable(); break; case BACK_TO_GRAPHIC: mng.backToGraphic(); break; case BACKGROUND: showROISelector(StatsResultsPaneMng.TABLE_BACKGROUND, "Background"); break; case RATIO: showROISelector(StatsResultsPaneMng.TABLE_RATIO, "Ratio"); break; case INITIAL: view.setEnabledMoveButtons(false); mng.displayInitialData(); break; } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
3,236,887
public List childNodes() { return Collections.EMPTY_LIST; }
public List childNodes() { return EMPTY_LIST; }
3,236,888
public int m_search(RubyObject target, int pos) {// RubyString str = RubyString.m_as_str(target); String str = ((RubyString)target).getValue(); if (pos >= str.length()) { return -1; } recompileIfNeeded(); RubyMatchData result = (RubyMatchData)matcher.search(getRuby(), str, pos); getRuby().setBackRef(result); return result.matchStartPosition(); }
public int m_search(RubyObject target, int pos) {// RubyString str = RubyString.m_as_str(target); String str = ((RubyString)target).getValue(); if (pos >= str.length()) { return -1; } recompileIfNeeded(); RubyObject result = matcher.search(getRuby(), str, pos); getRuby().setBackRef(result); return result.matchStartPosition(); }
3,236,889
public int m_search(RubyObject target, int pos) {// RubyString str = RubyString.m_as_str(target); String str = ((RubyString)target).getValue(); if (pos >= str.length()) { return -1; } recompileIfNeeded(); RubyMatchData result = (RubyMatchData)matcher.search(getRuby(), str, pos); getRuby().setBackRef(result); return result.matchStartPosition(); }
public int m_search(RubyObject target, int pos) {// RubyString str = RubyString.m_as_str(target); String str = ((RubyString)target).getValue(); if (pos >= str.length()) { return -1; } recompileIfNeeded(); RubyMatchData result = (RubyMatchData)matcher.search(getRuby(), str, pos); getRuby().setBackRef(result); return result instanceof RubyMatchData ? ((RubyMatchData)result).matchStartPosition() : -1; }
3,236,890
private void buildPresentation(String imageName) { control = new RenderingAgtCtrl(this); presentation = new RenderingAgtUIF(control, registry, imageName); control.setPresentation(presentation); }
private void buildPresentation() { control = new RenderingAgtCtrl(this); presentation = new RenderingAgtUIF(control, registry, imageName); control.setPresentation(presentation); }
3,236,891
private void buildPresentation(String imageName) { control = new RenderingAgtCtrl(this); presentation = new RenderingAgtUIF(control, registry, imageName); control.setPresentation(presentation); }
private void buildPresentation(String imageName) { control = new RenderingAgtCtrl(this); presentation = new RenderingAgtUIF(control, registry, imageName); control.setPresentation(presentation); }
3,236,892
private void handleDisplayViewerRelatedAgents(DisplayViewerRelatedAgent response) { if (response.isOnOff()) { if (presentation != null) presentation.deIconify(); } else { if (presentation != null) removePresentation(); } }
private void handleDisplayViewerRelatedAgents(DisplayViewerRelatedAgent response) { if (response.isOnOff()) { if (presentation == null) { initChannelData(); buildPresentation(); } presentation.deIconify(); } else { if (presentation != null) removePresentation(); } }
3,236,893
private void handleImageLoaded(ImageLoaded response) { LoadImage request = (LoadImage) response.getACT(); renderingControl = response.getProxy(); pxsDims = renderingControl.getPixelsDims(); pxsStats = renderingControl.getPixelsStats(); curImageID = request.getImageID(); curPixelsID = request.getPixelsID(); initChannelData(); if (presentation != null) removePresentation(); buildPresentation(request.getImageName()); }
private void handleImageLoaded(ImageLoaded response) { LoadImage request = (LoadImage) response.getACT(); renderingControl = response.getProxy(); pxsDims = renderingControl.getPixelsDims(); pxsStats = renderingControl.getPixelsStats(); curImageID = request.getImageID(); curPixelsID = request.getPixelsID(); curImageName = request.getImageName(); if (presentation != null) removePresentation(); buildPresentation(request.getImageName()); }
3,236,894
private void handleImageLoaded(ImageLoaded response) { LoadImage request = (LoadImage) response.getACT(); renderingControl = response.getProxy(); pxsDims = renderingControl.getPixelsDims(); pxsStats = renderingControl.getPixelsStats(); curImageID = request.getImageID(); curPixelsID = request.getPixelsID(); initChannelData(); if (presentation != null) removePresentation(); buildPresentation(request.getImageName()); }
private void handleImageLoaded(ImageLoaded response) { LoadImage request = (LoadImage) response.getACT(); renderingControl = response.getProxy(); pxsDims = renderingControl.getPixelsDims(); pxsStats = renderingControl.getPixelsStats(); curImageID = request.getImageID(); curPixelsID = request.getPixelsID(); initChannelData(); if (presentation != null) removePresentation(); }
3,236,895
private void refreshImage() { RenderImage event = new RenderImage(curPixelsID); registry.getEventBus().post(event); }
private void refreshImage() { RenderImage event = new RenderImage(curPixelsID); registry.getEventBus().post(event); }
3,236,896
private void removePresentation() { control.disposeDialogs(); presentation.dispose(); control = null; presentation = null; }
private void removePresentation() { control.disposeDialogs(); presentation.dispose(); presentation = null; }
3,236,897
public boolean isAutoloadDefined(String id) { return false; }
public boolean isAutoloadDefined(String name) { return false; }
3,236,899
public boolean isClassDefined(String id) { return false; }
public boolean isClassDefined(String id) { return false; }
3,236,900
public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { if (!isBlockGiven()) { throw new RaiseException(this, "LocalJumpError", "yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); Scope oldScope = (Scope)getScope().getTop(); getScope().setTop(tmpBlock.scope); // getScope().push(tmpBlock.scope); // block.pop(); block = block.prev; if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); try { while (true) { try { if (node == null) { return getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } return ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { return node.eval(this, self); } } catch (RedoException rExcptn) { } } //break; } catch (NextException nExcptn) { return getNil(); /* } catch (BreakException bExcptn) { throw bExcptn;*/ } catch (ReturnException rExcptn) { // break; return rExcptn.getReturnValue(); } catch (BreakException bExcptn) { // +++ throw new ReturnException(getNil()); // --- } finally { iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); getScope().setTop(oldScope); } }
public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { if (!isBlockGiven()) { throw new RaiseException(this, "LocalJumpError", "yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); Scope oldScope = (Scope)getScope().getTop(); getScope().setTop(tmpBlock.scope); // getScope().push(tmpBlock.scope); // block.pop(); block = block.prev; if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); try { while (true) { try { if (node == null) { return getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } return ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { return node.eval(this, self); } } catch (RedoException rExcptn) { } } //break; } catch (NextException nExcptn) { return getNil(); /* /* catch (BreakException bExcptn) { throw bExcptn;*/ } catch (ReturnException rExcptn) { // break; return rExcptn.getReturnValue(); /* catch (BreakException bExcptn) { // +++ throw new ReturnException(getNil()); // --- } finally { iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); getScope().setTop(oldScope); } }
3,236,901
public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { if (!isBlockGiven()) { throw new RaiseException(this, "LocalJumpError", "yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); Scope oldScope = (Scope)getScope().getTop(); getScope().setTop(tmpBlock.scope); // getScope().push(tmpBlock.scope); // block.pop(); block = block.prev; if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); try { while (true) { try { if (node == null) { return getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } return ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { return node.eval(this, self); } } catch (RedoException rExcptn) { } } //break; } catch (NextException nExcptn) { return getNil(); /* } catch (BreakException bExcptn) { throw bExcptn;*/ } catch (ReturnException rExcptn) { // break; return rExcptn.getReturnValue(); } catch (BreakException bExcptn) { // +++ throw new ReturnException(getNil()); // --- } finally { iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); getScope().setTop(oldScope); } }
public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { if (!isBlockGiven()) { throw new RaiseException(this, "LocalJumpError", "yield called out of block"); } RubyVarmap.push(this); pushClass(); RubyBlock tmpBlock = block.getTmp(); RubyFrame frame = new RubyFrame(tmpBlock.frame); // block.frame; frame.setPrev(getRubyFrame()); setRubyFrame(frame); CRefNode oldCRef = getCRef(); setCRef(getRubyFrame().getCbase()); Scope oldScope = (Scope)getScope().getTop(); getScope().setTop(tmpBlock.scope); // getScope().push(tmpBlock.scope); // block.pop(); block = block.prev; if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { setDynamicVars(new RubyVarmap(null, null, tmpBlock.dynamicVars)); } else { setDynamicVars(block.dynamicVars); } setRubyClass((klass != null) ? klass : tmpBlock.klass); if (klass == null) { self = tmpBlock.self; } Node node = tmpBlock.body; if (tmpBlock.var != null) { // try { if (tmpBlock.var == Node.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new RubyArgumentException(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(tmpBlock.var instanceof MAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } ((AssignableNode) tmpBlock.var).assign(this, self, value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } iter.push(tmpBlock.iter); try { while (true) { try { if (node == null) { return getNil(); } else if (node instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } return ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { return node.eval(this, self); } } catch (RedoException rExcptn) { } } //break; } catch (NextException nExcptn) { return getNil(); /* } catch (BreakException bExcptn) { throw bExcptn;*/ } catch (ReturnException rExcptn) { // break; return rExcptn.getReturnValue(); } catch (BreakException bExcptn) { // +++ throw new ReturnException(getNil()); // --- } finally { iter.pop(); popClass(); RubyVarmap.pop(this); block.setTmp(tmpBlock); setRubyFrame(getRubyFrame().getPrev()); setCRef(oldCRef); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); getScope().setTop(oldScope); } }
3,236,902
public File findFile(File i2find) { RubyArray lLoadPath = (RubyArray) getGlobalVar("$:"); int lPathNb = lLoadPath.getLength(); String l2Find = i2find.getPath(); for (int i = 0; i < lPathNb; i++) { String lCurPath = ((RubyString) lLoadPath.entry(i)).getValue(); File lCurFile = new File(lCurPath + File.separatorChar + l2Find); if (lCurFile.exists()) { i2find = lCurFile; break; } } if (i2find.exists()) { return i2find; } else { throw new LoadError(ruby, "No such file to load -- " + i2find.getPath());// throw new RuntimeException("file " + i2find.getPath() + " can't be found!"); } }
public File findFile(Ruby ruby, File i2find) { RubyArray lLoadPath = (RubyArray) getGlobalVar("$:"); int lPathNb = lLoadPath.getLength(); String l2Find = i2find.getPath(); for (int i = 0; i < lPathNb; i++) { String lCurPath = ((RubyString) lLoadPath.entry(i)).getValue(); File lCurFile = new File(lCurPath + File.separatorChar + l2Find); if (lCurFile.exists()) { i2find = lCurFile; break; } } if (i2find.exists()) { return i2find; } else { throw new LoadError(ruby, "No such file to load -- " + i2find.getPath());// throw new RuntimeException("file " + i2find.getPath() + " can't be found!"); } }
3,236,903
public SingletonReference(String name, Set patterns, String objectTypeName) { this.name = name; this.patterns = patterns; this.objectTypeName = objectTypeName; }
public SingletonReference(String name, Set patterns, String objectTypeName) { this.name = name; this.patterns = patterns; this.objectTypeName = objectTypeName; }
3,236,906
public final String getName() { return name; }
public String getName() { return name; }
3,236,907
public synchronized final Object getObject() throws ClassNotFoundException { ServiceContext serviceContext = ServiceContextThreadLocal.get(); if (serviceContext == null) { throw new IllegalStateException("Service context has not been set"); } synchronized (this) { if (objectType == null) { objectType = ClassLoading.loadClass(objectTypeName, serviceContext.getClassLoader()); } } Set targets = ServiceInstanceUtil.getRunningTargets(serviceContext.getKernel(), patterns); if (targets.size() != 1) { throw new IllegalStateException("Invalid reference: name=" + name + ", targetCount=" + targets.size() + ", patterns=" + getPatternsText()); } // add a dependency on our target and create the proxy ObjectName target = (ObjectName) targets.iterator().next(); ProxyManager proxyManager = null; try { proxyManager = ProxyManager.findProxyManager(serviceContext.getKernel()); } catch (ServiceNotFoundException e) { throw new IllegalStateException("ProxyManger has not been loaded"); } try { return proxyManager.createProxy(target, objectType, this); } catch (ServiceNotFoundException e) { throw new IllegalStateException("Referenced object was unregistered before a proxy could be created: name=" + name + ", targetCount=" + targets.size() + ", patterns=" + getPatternsText()); } }
public synchronized final Object getObject() throws ClassNotFoundException { ServiceContext serviceContext = ServiceContextThreadLocal.get(); if (serviceContext == null) { throw new IllegalStateException("Service context has not been set"); } synchronized (this) { if (objectType == null) { objectType = ClassLoading.loadClass(referenceType, serviceContext.getClassLoader()); } } Set targets = ServiceInstanceUtil.getRunningTargets(serviceContext.getKernel(), patterns); if (targets.size() != 1) { throw new IllegalStateException("Invalid reference: name=" + name + ", targetCount=" + targets.size() + ", patterns=" + getPatternsText()); } // add a dependency on our target and create the proxy ObjectName target = (ObjectName) targets.iterator().next(); ProxyManager proxyManager = null; try { proxyManager = ProxyManager.findProxyManager(serviceContext.getKernel()); } catch (ServiceNotFoundException e) { throw new IllegalStateException("ProxyManger has not been loaded"); } try { return proxyManager.createProxy(target, objectType, this); } catch (ServiceNotFoundException e) { throw new IllegalStateException("Referenced object was unregistered before a proxy could be created: name=" + name + ", targetCount=" + targets.size() + ", patterns=" + getPatternsText()); } }
3,236,908
public final Class getObjectType() { ServiceContext serviceContext = ServiceContextThreadLocal.get(); if (serviceContext == null) { throw new IllegalStateException("Service context has not been set"); } synchronized (this) { if (objectType == null) { try { objectType = ClassLoading.loadClass(objectTypeName, serviceContext.getClassLoader()); } catch (ClassNotFoundException e) { throw new IllegalStateException("Could not load singleton reference object type"); } } } return objectType; }
public final Class getObjectType() { ServiceContext serviceContext = ServiceContextThreadLocal.get(); if (serviceContext == null) { throw new IllegalStateException("Service context has not been set"); } synchronized (this) { if (objectType == null) { try { objectType = ClassLoading.loadClass(referenceType, serviceContext.getClassLoader()); } catch (ClassNotFoundException e) { throw new IllegalStateException("Could not load singleton reference object type"); } } } return objectType; }
3,236,909
void createNodes(Set nodes, TreeImageDisplay newNode) { Iterator i = nodes.iterator(); TreeImageDisplay parent; List list; Iterator j; DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); buildEmptyNode(newNode); while (i.hasNext()) { parent = (TreeImageDisplay) i.next(); parent.addChildDisplay(newNode); list = sorter.sort(parent.getChildrenDisplay()); parent.removeAllChildren(); j = list.iterator(); while (j.hasNext()) dtm.insertNodeInto((TreeImageDisplay) j.next(), parent, parent.getChildCount()); dtm.reload(parent); expandNode(parent); } }
void createNodes(Set nodes, TreeImageDisplay newNode, TreeImageDisplay parentDisplay) { Iterator i = nodes.iterator(); TreeImageDisplay parent; List list; Iterator j; DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); buildEmptyNode(newNode); while (i.hasNext()) { parent = (TreeImageDisplay) i.next(); parent.addChildDisplay(newNode); list = sorter.sort(parent.getChildrenDisplay()); parent.removeAllChildren(); j = list.iterator(); while (j.hasNext()) dtm.insertNodeInto((TreeImageDisplay) j.next(), parent, parent.getChildCount()); dtm.reload(parent); expandNode(parent); } }
3,236,910
void removeNodes(Set nodes) { Iterator i = nodes.iterator(); TreeImageDisplay node; TreeImageDisplay parent; DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); while (i.hasNext()) { node = (TreeImageDisplay) i.next(); parent = node.getParentDisplay(); parent.removeChildDisplay(node); parent.remove(node); dtm.reload(parent); } }
void removeNodes(Set nodes, TreeImageDisplay parentDisplay) { Iterator i = nodes.iterator(); TreeImageDisplay node; TreeImageDisplay parent; DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); while (i.hasNext()) { node = (TreeImageDisplay) i.next(); parent = node.getParentDisplay(); parent.removeChildDisplay(node); parent.remove(node); dtm.reload(parent); } }
3,236,912
public Boolean compare(Object l, Object r) { return (l.equals(r)) ? TRUE : FALSE; }
public Boolean compare(Object l, Object r) { return (!l.equals(r)) ? TRUE : FALSE; }
3,236,914
public static boolean isNumber(Object o) { return ((o instanceof Integer) || o instanceof Long || o instanceof Short || o instanceof Byte); }
public static boolean isNumber(Object o) { return ((o instanceof Integer) || o instanceof Long || o instanceof Short || o instanceof Byte); }
3,236,915
public static void createModuleClass(RubyClass moduleClass) {; Callback op_eqq = CallbackFactory.getMethod(RubyModule.class, "op_eqq", RubyObject.class); Callback op_cmp = CallbackFactory.getMethod(RubyModule.class, "op_cmp", RubyObject.class); Callback op_lt = CallbackFactory.getMethod(RubyModule.class, "op_lt", RubyObject.class); Callback op_le = CallbackFactory.getMethod(RubyModule.class, "op_le", RubyObject.class); Callback op_gt = CallbackFactory.getMethod(RubyModule.class, "op_gt", RubyObject.class); Callback op_ge = CallbackFactory.getMethod(RubyModule.class, "op_ge", RubyObject.class); Callback clone = CallbackFactory.getMethod(RubyModule.class, "rbClone"); Callback dup = CallbackFactory.getMethod(RubyModule.class, "dup"); Callback to_s = CallbackFactory.getMethod(RubyModule.class, "to_s"); Callback included_modules = CallbackFactory.getMethod(RubyModule.class, "included_modules"); Callback name = CallbackFactory.getMethod(RubyModule.class, "name"); Callback ancestors = CallbackFactory.getMethod(RubyModule.class, "ancestors"); Callback attr = CallbackFactory.getOptMethod(RubyModule.class, "attr", RubyObject.class); Callback attr_reader = CallbackFactory.getOptMethod(RubyModule.class, "attr_reader"); Callback attr_writer = CallbackFactory.getOptMethod(RubyModule.class, "attr_writer"); Callback attr_accessor = CallbackFactory.getOptMethod(RubyModule.class, "attr_accessor"); Callback newModule = CallbackFactory.getSingletonMethod(RubyModule.class, "newModule"); Callback initialize = CallbackFactory.getOptMethod(RubyModule.class, "initialize"); Callback instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback public_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback protected_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "protected_instance_methods"); Callback private_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "private_instance_methods"); Callback constants = CallbackFactory.getMethod(RubyModule.class, "constants"); Callback const_get = CallbackFactory.getMethod(RubyModule.class, "const_get", RubyObject.class); Callback const_set = new ReflectionCallbackMethod(RubyModule.class, "const_set", new Class[] { RubyObject.class, RubyObject.class }); Callback const_defined = CallbackFactory.getMethod(RubyModule.class, "const_defined", RubyObject.class); Callback class_variables = CallbackFactory.getMethod(RubyModule.class, "class_variables"); Callback remove_class_variable = CallbackFactory.getMethod(RubyModule.class, "remove_class_variable", RubyObject.class); Callback append_features = CallbackFactory.getMethod(RubyModule.class, "append_features", RubyModule.class); Callback extend_object = CallbackFactory.getMethod(RubyModule.class, "extend_object", RubyObject.class); Callback include = CallbackFactory.getOptMethod(RubyModule.class, "include"); Callback rbPublic = CallbackFactory.getOptMethod(RubyModule.class, "rbPublic"); Callback rbProtected = CallbackFactory.getOptMethod(RubyModule.class, "rbProtected"); Callback rbPrivate = CallbackFactory.getOptMethod(RubyModule.class, "rbPrivate"); Callback module_function = CallbackFactory.getOptMethod(RubyModule.class, "module_function"); Callback method_defined = CallbackFactory.getMethod(RubyModule.class, "method_defined", RubyObject.class); Callback public_class_method = CallbackFactory.getOptMethod(RubyModule.class, "public_class_method"); Callback private_class_method = CallbackFactory.getOptMethod(RubyModule.class, "private_class_method"); Callback module_eval = CallbackFactory.getOptMethod(RubyModule.class, "module_eval"); Callback remove_method = CallbackFactory.getMethod(RubyModule.class, "remove_method", RubyObject.class); Callback undef_method = CallbackFactory.getMethod(RubyModule.class, "undef_method", RubyObject.class); Callback alias_method = new ReflectionCallbackMethod(RubyModule.class, "alias_method", new Class[] { RubyObject.class, RubyObject.class }); moduleClass.defineMethod("===", op_eqq); moduleClass.defineMethod("<=>", op_cmp); moduleClass.defineMethod("<", op_lt); moduleClass.defineMethod("<=", op_le); moduleClass.defineMethod(">", op_gt); moduleClass.defineMethod(">=", op_ge); moduleClass.defineMethod("clone", clone); moduleClass.defineMethod("dup", dup); moduleClass.defineMethod("to_s", to_s); moduleClass.defineMethod("included_modules", included_modules); moduleClass.defineMethod("name", name); moduleClass.defineMethod("ancestors", ancestors); moduleClass.definePrivateMethod("attr", attr); moduleClass.definePrivateMethod("attr_reader", attr_reader); moduleClass.definePrivateMethod("attr_writer", attr_writer); moduleClass.definePrivateMethod("attr_accessor", attr_accessor); moduleClass.defineSingletonMethod("new", newModule); moduleClass.defineMethod("initialize", initialize); moduleClass.defineMethod("instance_methods", instance_methods); moduleClass.defineMethod("public_instance_methods", public_instance_methods); moduleClass.defineMethod("protected_instance_methods", protected_instance_methods); moduleClass.defineMethod("private_instance_methods", private_instance_methods); moduleClass.defineMethod("constants", constants); moduleClass.defineMethod("const_get", const_get); moduleClass.defineMethod("const_set", const_set); moduleClass.defineMethod("const_defined?", const_defined); moduleClass.definePrivateMethod("method_added", CallbackFactory.getNilMethod()); moduleClass.defineMethod("class_variables", class_variables); moduleClass.definePrivateMethod("remove_class_variable", remove_class_variable); moduleClass.definePrivateMethod("append_features", append_features); moduleClass.definePrivateMethod("extend_object", extend_object); moduleClass.definePrivateMethod("include", include); moduleClass.definePrivateMethod("public", rbPublic); moduleClass.definePrivateMethod("protected", rbProtected); moduleClass.definePrivateMethod("private", rbPrivate); moduleClass.definePrivateMethod("module_function", module_function); moduleClass.defineMethod("method_defined?", method_defined); moduleClass.defineMethod("public_class_method", public_class_method); moduleClass.defineMethod("private_class_method", private_class_method); moduleClass.defineMethod("module_eval", module_eval); moduleClass.defineMethod("class_eval", module_eval); moduleClass.defineMethod("remove_method", remove_method); moduleClass.defineMethod("undef_method", undef_method); moduleClass.defineMethod("alias_method", alias_method); /*rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);*/ moduleClass.defineSingletonMethod("nesting", CallbackFactory.getSingletonMethod(RubyModule.class, "nesting")); }
public static void createModuleClass(RubyClass moduleClass) {; Callback op_eqq = CallbackFactory.getMethod(RubyModule.class, "op_eqq", RubyObject.class); Callback op_cmp = CallbackFactory.getMethod(RubyModule.class, "op_cmp", RubyObject.class); Callback op_lt = CallbackFactory.getMethod(RubyModule.class, "op_lt", RubyObject.class); Callback op_le = CallbackFactory.getMethod(RubyModule.class, "op_le", RubyObject.class); Callback op_gt = CallbackFactory.getMethod(RubyModule.class, "op_gt", RubyObject.class); Callback op_ge = CallbackFactory.getMethod(RubyModule.class, "op_ge", RubyObject.class); Callback clone = CallbackFactory.getMethod(RubyModule.class, "rbClone"); Callback dup = CallbackFactory.getMethod(RubyModule.class, "dup"); Callback to_s = CallbackFactory.getMethod(RubyModule.class, "to_s"); Callback included_modules = CallbackFactory.getMethod(RubyModule.class, "included_modules"); Callback name = CallbackFactory.getMethod(RubyModule.class, "name"); Callback ancestors = CallbackFactory.getMethod(RubyModule.class, "ancestors"); Callback attr = CallbackFactory.getOptMethod(RubyModule.class, "attr", RubyObject.class); Callback attr_reader = CallbackFactory.getOptMethod(RubyModule.class, "attr_reader"); Callback attr_writer = CallbackFactory.getOptMethod(RubyModule.class, "attr_writer"); Callback attr_accessor = CallbackFactory.getOptMethod(RubyModule.class, "attr_accessor"); Callback newModule = CallbackFactory.getSingletonMethod(RubyModule.class, "newModule"); Callback initialize = CallbackFactory.getOptMethod(RubyModule.class, "initialize"); Callback instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback public_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback protected_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "protected_instance_methods"); Callback private_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "private_instance_methods"); Callback constants = CallbackFactory.getMethod(RubyModule.class, "constants"); Callback const_get = CallbackFactory.getMethod(RubyModule.class, "const_get", RubyObject.class); Callback const_set = CallbackFactory.getMethod(RubyModule.class, "const_set", RubyObject.class, RubyObject.class); Callback const_defined = CallbackFactory.getMethod(RubyModule.class, "const_defined", RubyObject.class); Callback class_variables = CallbackFactory.getMethod(RubyModule.class, "class_variables"); Callback remove_class_variable = CallbackFactory.getMethod(RubyModule.class, "remove_class_variable", RubyObject.class); Callback append_features = CallbackFactory.getMethod(RubyModule.class, "append_features", RubyModule.class); Callback extend_object = CallbackFactory.getMethod(RubyModule.class, "extend_object", RubyObject.class); Callback include = CallbackFactory.getOptMethod(RubyModule.class, "include"); Callback rbPublic = CallbackFactory.getOptMethod(RubyModule.class, "rbPublic"); Callback rbProtected = CallbackFactory.getOptMethod(RubyModule.class, "rbProtected"); Callback rbPrivate = CallbackFactory.getOptMethod(RubyModule.class, "rbPrivate"); Callback module_function = CallbackFactory.getOptMethod(RubyModule.class, "module_function"); Callback method_defined = CallbackFactory.getMethod(RubyModule.class, "method_defined", RubyObject.class); Callback public_class_method = CallbackFactory.getOptMethod(RubyModule.class, "public_class_method"); Callback private_class_method = CallbackFactory.getOptMethod(RubyModule.class, "private_class_method"); Callback module_eval = CallbackFactory.getOptMethod(RubyModule.class, "module_eval"); Callback remove_method = CallbackFactory.getMethod(RubyModule.class, "remove_method", RubyObject.class); Callback undef_method = CallbackFactory.getMethod(RubyModule.class, "undef_method", RubyObject.class); Callback alias_method = new ReflectionCallbackMethod(RubyModule.class, "alias_method", new Class[] { RubyObject.class, RubyObject.class }); moduleClass.defineMethod("===", op_eqq); moduleClass.defineMethod("<=>", op_cmp); moduleClass.defineMethod("<", op_lt); moduleClass.defineMethod("<=", op_le); moduleClass.defineMethod(">", op_gt); moduleClass.defineMethod(">=", op_ge); moduleClass.defineMethod("clone", clone); moduleClass.defineMethod("dup", dup); moduleClass.defineMethod("to_s", to_s); moduleClass.defineMethod("included_modules", included_modules); moduleClass.defineMethod("name", name); moduleClass.defineMethod("ancestors", ancestors); moduleClass.definePrivateMethod("attr", attr); moduleClass.definePrivateMethod("attr_reader", attr_reader); moduleClass.definePrivateMethod("attr_writer", attr_writer); moduleClass.definePrivateMethod("attr_accessor", attr_accessor); moduleClass.defineSingletonMethod("new", newModule); moduleClass.defineMethod("initialize", initialize); moduleClass.defineMethod("instance_methods", instance_methods); moduleClass.defineMethod("public_instance_methods", public_instance_methods); moduleClass.defineMethod("protected_instance_methods", protected_instance_methods); moduleClass.defineMethod("private_instance_methods", private_instance_methods); moduleClass.defineMethod("constants", constants); moduleClass.defineMethod("const_get", const_get); moduleClass.defineMethod("const_set", const_set); moduleClass.defineMethod("const_defined?", const_defined); moduleClass.definePrivateMethod("method_added", CallbackFactory.getNilMethod()); moduleClass.defineMethod("class_variables", class_variables); moduleClass.definePrivateMethod("remove_class_variable", remove_class_variable); moduleClass.definePrivateMethod("append_features", append_features); moduleClass.definePrivateMethod("extend_object", extend_object); moduleClass.definePrivateMethod("include", include); moduleClass.definePrivateMethod("public", rbPublic); moduleClass.definePrivateMethod("protected", rbProtected); moduleClass.definePrivateMethod("private", rbPrivate); moduleClass.definePrivateMethod("module_function", module_function); moduleClass.defineMethod("method_defined?", method_defined); moduleClass.defineMethod("public_class_method", public_class_method); moduleClass.defineMethod("private_class_method", private_class_method); moduleClass.defineMethod("module_eval", module_eval); moduleClass.defineMethod("class_eval", module_eval); moduleClass.defineMethod("remove_method", remove_method); moduleClass.defineMethod("undef_method", undef_method); moduleClass.defineMethod("alias_method", alias_method); /*rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);*/ moduleClass.defineSingletonMethod("nesting", CallbackFactory.getSingletonMethod(RubyModule.class, "nesting")); }
3,236,916
public static void createModuleClass(RubyClass moduleClass) {; Callback op_eqq = CallbackFactory.getMethod(RubyModule.class, "op_eqq", RubyObject.class); Callback op_cmp = CallbackFactory.getMethod(RubyModule.class, "op_cmp", RubyObject.class); Callback op_lt = CallbackFactory.getMethod(RubyModule.class, "op_lt", RubyObject.class); Callback op_le = CallbackFactory.getMethod(RubyModule.class, "op_le", RubyObject.class); Callback op_gt = CallbackFactory.getMethod(RubyModule.class, "op_gt", RubyObject.class); Callback op_ge = CallbackFactory.getMethod(RubyModule.class, "op_ge", RubyObject.class); Callback clone = CallbackFactory.getMethod(RubyModule.class, "rbClone"); Callback dup = CallbackFactory.getMethod(RubyModule.class, "dup"); Callback to_s = CallbackFactory.getMethod(RubyModule.class, "to_s"); Callback included_modules = CallbackFactory.getMethod(RubyModule.class, "included_modules"); Callback name = CallbackFactory.getMethod(RubyModule.class, "name"); Callback ancestors = CallbackFactory.getMethod(RubyModule.class, "ancestors"); Callback attr = CallbackFactory.getOptMethod(RubyModule.class, "attr", RubyObject.class); Callback attr_reader = CallbackFactory.getOptMethod(RubyModule.class, "attr_reader"); Callback attr_writer = CallbackFactory.getOptMethod(RubyModule.class, "attr_writer"); Callback attr_accessor = CallbackFactory.getOptMethod(RubyModule.class, "attr_accessor"); Callback newModule = CallbackFactory.getSingletonMethod(RubyModule.class, "newModule"); Callback initialize = CallbackFactory.getOptMethod(RubyModule.class, "initialize"); Callback instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback public_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback protected_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "protected_instance_methods"); Callback private_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "private_instance_methods"); Callback constants = CallbackFactory.getMethod(RubyModule.class, "constants"); Callback const_get = CallbackFactory.getMethod(RubyModule.class, "const_get", RubyObject.class); Callback const_set = new ReflectionCallbackMethod(RubyModule.class, "const_set", new Class[] { RubyObject.class, RubyObject.class }); Callback const_defined = CallbackFactory.getMethod(RubyModule.class, "const_defined", RubyObject.class); Callback class_variables = CallbackFactory.getMethod(RubyModule.class, "class_variables"); Callback remove_class_variable = CallbackFactory.getMethod(RubyModule.class, "remove_class_variable", RubyObject.class); Callback append_features = CallbackFactory.getMethod(RubyModule.class, "append_features", RubyModule.class); Callback extend_object = CallbackFactory.getMethod(RubyModule.class, "extend_object", RubyObject.class); Callback include = CallbackFactory.getOptMethod(RubyModule.class, "include"); Callback rbPublic = CallbackFactory.getOptMethod(RubyModule.class, "rbPublic"); Callback rbProtected = CallbackFactory.getOptMethod(RubyModule.class, "rbProtected"); Callback rbPrivate = CallbackFactory.getOptMethod(RubyModule.class, "rbPrivate"); Callback module_function = CallbackFactory.getOptMethod(RubyModule.class, "module_function"); Callback method_defined = CallbackFactory.getMethod(RubyModule.class, "method_defined", RubyObject.class); Callback public_class_method = CallbackFactory.getOptMethod(RubyModule.class, "public_class_method"); Callback private_class_method = CallbackFactory.getOptMethod(RubyModule.class, "private_class_method"); Callback module_eval = CallbackFactory.getOptMethod(RubyModule.class, "module_eval"); Callback remove_method = CallbackFactory.getMethod(RubyModule.class, "remove_method", RubyObject.class); Callback undef_method = CallbackFactory.getMethod(RubyModule.class, "undef_method", RubyObject.class); Callback alias_method = new ReflectionCallbackMethod(RubyModule.class, "alias_method", new Class[] { RubyObject.class, RubyObject.class }); moduleClass.defineMethod("===", op_eqq); moduleClass.defineMethod("<=>", op_cmp); moduleClass.defineMethod("<", op_lt); moduleClass.defineMethod("<=", op_le); moduleClass.defineMethod(">", op_gt); moduleClass.defineMethod(">=", op_ge); moduleClass.defineMethod("clone", clone); moduleClass.defineMethod("dup", dup); moduleClass.defineMethod("to_s", to_s); moduleClass.defineMethod("included_modules", included_modules); moduleClass.defineMethod("name", name); moduleClass.defineMethod("ancestors", ancestors); moduleClass.definePrivateMethod("attr", attr); moduleClass.definePrivateMethod("attr_reader", attr_reader); moduleClass.definePrivateMethod("attr_writer", attr_writer); moduleClass.definePrivateMethod("attr_accessor", attr_accessor); moduleClass.defineSingletonMethod("new", newModule); moduleClass.defineMethod("initialize", initialize); moduleClass.defineMethod("instance_methods", instance_methods); moduleClass.defineMethod("public_instance_methods", public_instance_methods); moduleClass.defineMethod("protected_instance_methods", protected_instance_methods); moduleClass.defineMethod("private_instance_methods", private_instance_methods); moduleClass.defineMethod("constants", constants); moduleClass.defineMethod("const_get", const_get); moduleClass.defineMethod("const_set", const_set); moduleClass.defineMethod("const_defined?", const_defined); moduleClass.definePrivateMethod("method_added", CallbackFactory.getNilMethod()); moduleClass.defineMethod("class_variables", class_variables); moduleClass.definePrivateMethod("remove_class_variable", remove_class_variable); moduleClass.definePrivateMethod("append_features", append_features); moduleClass.definePrivateMethod("extend_object", extend_object); moduleClass.definePrivateMethod("include", include); moduleClass.definePrivateMethod("public", rbPublic); moduleClass.definePrivateMethod("protected", rbProtected); moduleClass.definePrivateMethod("private", rbPrivate); moduleClass.definePrivateMethod("module_function", module_function); moduleClass.defineMethod("method_defined?", method_defined); moduleClass.defineMethod("public_class_method", public_class_method); moduleClass.defineMethod("private_class_method", private_class_method); moduleClass.defineMethod("module_eval", module_eval); moduleClass.defineMethod("class_eval", module_eval); moduleClass.defineMethod("remove_method", remove_method); moduleClass.defineMethod("undef_method", undef_method); moduleClass.defineMethod("alias_method", alias_method); /*rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);*/ moduleClass.defineSingletonMethod("nesting", CallbackFactory.getSingletonMethod(RubyModule.class, "nesting")); }
public static void createModuleClass(RubyClass moduleClass) {; Callback op_eqq = CallbackFactory.getMethod(RubyModule.class, "op_eqq", RubyObject.class); Callback op_cmp = CallbackFactory.getMethod(RubyModule.class, "op_cmp", RubyObject.class); Callback op_lt = CallbackFactory.getMethod(RubyModule.class, "op_lt", RubyObject.class); Callback op_le = CallbackFactory.getMethod(RubyModule.class, "op_le", RubyObject.class); Callback op_gt = CallbackFactory.getMethod(RubyModule.class, "op_gt", RubyObject.class); Callback op_ge = CallbackFactory.getMethod(RubyModule.class, "op_ge", RubyObject.class); Callback clone = CallbackFactory.getMethod(RubyModule.class, "rbClone"); Callback dup = CallbackFactory.getMethod(RubyModule.class, "dup"); Callback to_s = CallbackFactory.getMethod(RubyModule.class, "to_s"); Callback included_modules = CallbackFactory.getMethod(RubyModule.class, "included_modules"); Callback name = CallbackFactory.getMethod(RubyModule.class, "name"); Callback ancestors = CallbackFactory.getMethod(RubyModule.class, "ancestors"); Callback attr = CallbackFactory.getOptMethod(RubyModule.class, "attr", RubyObject.class); Callback attr_reader = CallbackFactory.getOptMethod(RubyModule.class, "attr_reader"); Callback attr_writer = CallbackFactory.getOptMethod(RubyModule.class, "attr_writer"); Callback attr_accessor = CallbackFactory.getOptMethod(RubyModule.class, "attr_accessor"); Callback newModule = CallbackFactory.getSingletonMethod(RubyModule.class, "newModule"); Callback initialize = CallbackFactory.getOptMethod(RubyModule.class, "initialize"); Callback instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback public_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback protected_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "protected_instance_methods"); Callback private_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "private_instance_methods"); Callback constants = CallbackFactory.getMethod(RubyModule.class, "constants"); Callback const_get = CallbackFactory.getMethod(RubyModule.class, "const_get", RubyObject.class); Callback const_set = new ReflectionCallbackMethod(RubyModule.class, "const_set", new Class[] { RubyObject.class, RubyObject.class }); Callback const_defined = CallbackFactory.getMethod(RubyModule.class, "const_defined", RubyObject.class); Callback class_variables = CallbackFactory.getMethod(RubyModule.class, "class_variables"); Callback remove_class_variable = CallbackFactory.getMethod(RubyModule.class, "remove_class_variable", RubyObject.class); Callback append_features = CallbackFactory.getMethod(RubyModule.class, "append_features", RubyModule.class); Callback extend_object = CallbackFactory.getMethod(RubyModule.class, "extend_object", RubyObject.class); Callback include = CallbackFactory.getOptMethod(RubyModule.class, "include"); Callback rbPublic = CallbackFactory.getOptMethod(RubyModule.class, "rbPublic"); Callback rbProtected = CallbackFactory.getOptMethod(RubyModule.class, "rbProtected"); Callback rbPrivate = CallbackFactory.getOptMethod(RubyModule.class, "rbPrivate"); Callback module_function = CallbackFactory.getOptMethod(RubyModule.class, "module_function"); Callback method_defined = CallbackFactory.getMethod(RubyModule.class, "method_defined", RubyObject.class); Callback public_class_method = CallbackFactory.getOptMethod(RubyModule.class, "public_class_method"); Callback private_class_method = CallbackFactory.getOptMethod(RubyModule.class, "private_class_method"); Callback module_eval = CallbackFactory.getOptMethod(RubyModule.class, "module_eval"); Callback remove_method = CallbackFactory.getMethod(RubyModule.class, "remove_method", RubyObject.class); Callback undef_method = CallbackFactory.getMethod(RubyModule.class, "undef_method", RubyObject.class); Callback alias_method = CallbackFactory.getMethod(RubyModule.class, "alias_method", RubyObject.class, RubyObject.class); moduleClass.defineMethod("===", op_eqq); moduleClass.defineMethod("<=>", op_cmp); moduleClass.defineMethod("<", op_lt); moduleClass.defineMethod("<=", op_le); moduleClass.defineMethod(">", op_gt); moduleClass.defineMethod(">=", op_ge); moduleClass.defineMethod("clone", clone); moduleClass.defineMethod("dup", dup); moduleClass.defineMethod("to_s", to_s); moduleClass.defineMethod("included_modules", included_modules); moduleClass.defineMethod("name", name); moduleClass.defineMethod("ancestors", ancestors); moduleClass.definePrivateMethod("attr", attr); moduleClass.definePrivateMethod("attr_reader", attr_reader); moduleClass.definePrivateMethod("attr_writer", attr_writer); moduleClass.definePrivateMethod("attr_accessor", attr_accessor); moduleClass.defineSingletonMethod("new", newModule); moduleClass.defineMethod("initialize", initialize); moduleClass.defineMethod("instance_methods", instance_methods); moduleClass.defineMethod("public_instance_methods", public_instance_methods); moduleClass.defineMethod("protected_instance_methods", protected_instance_methods); moduleClass.defineMethod("private_instance_methods", private_instance_methods); moduleClass.defineMethod("constants", constants); moduleClass.defineMethod("const_get", const_get); moduleClass.defineMethod("const_set", const_set); moduleClass.defineMethod("const_defined?", const_defined); moduleClass.definePrivateMethod("method_added", CallbackFactory.getNilMethod()); moduleClass.defineMethod("class_variables", class_variables); moduleClass.definePrivateMethod("remove_class_variable", remove_class_variable); moduleClass.definePrivateMethod("append_features", append_features); moduleClass.definePrivateMethod("extend_object", extend_object); moduleClass.definePrivateMethod("include", include); moduleClass.definePrivateMethod("public", rbPublic); moduleClass.definePrivateMethod("protected", rbProtected); moduleClass.definePrivateMethod("private", rbPrivate); moduleClass.definePrivateMethod("module_function", module_function); moduleClass.defineMethod("method_defined?", method_defined); moduleClass.defineMethod("public_class_method", public_class_method); moduleClass.defineMethod("private_class_method", private_class_method); moduleClass.defineMethod("module_eval", module_eval); moduleClass.defineMethod("class_eval", module_eval); moduleClass.defineMethod("remove_method", remove_method); moduleClass.defineMethod("undef_method", undef_method); moduleClass.defineMethod("alias_method", alias_method); /*rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);*/ moduleClass.defineSingletonMethod("nesting", CallbackFactory.getSingletonMethod(RubyModule.class, "nesting")); }
3,236,917
public static void createModuleClass(RubyClass moduleClass) {; Callback op_eqq = CallbackFactory.getMethod(RubyModule.class, "op_eqq", RubyObject.class); Callback op_cmp = CallbackFactory.getMethod(RubyModule.class, "op_cmp", RubyObject.class); Callback op_lt = CallbackFactory.getMethod(RubyModule.class, "op_lt", RubyObject.class); Callback op_le = CallbackFactory.getMethod(RubyModule.class, "op_le", RubyObject.class); Callback op_gt = CallbackFactory.getMethod(RubyModule.class, "op_gt", RubyObject.class); Callback op_ge = CallbackFactory.getMethod(RubyModule.class, "op_ge", RubyObject.class); Callback clone = CallbackFactory.getMethod(RubyModule.class, "rbClone"); Callback dup = CallbackFactory.getMethod(RubyModule.class, "dup"); Callback to_s = CallbackFactory.getMethod(RubyModule.class, "to_s"); Callback included_modules = CallbackFactory.getMethod(RubyModule.class, "included_modules"); Callback name = CallbackFactory.getMethod(RubyModule.class, "name"); Callback ancestors = CallbackFactory.getMethod(RubyModule.class, "ancestors"); Callback attr = CallbackFactory.getOptMethod(RubyModule.class, "attr", RubyObject.class); Callback attr_reader = CallbackFactory.getOptMethod(RubyModule.class, "attr_reader"); Callback attr_writer = CallbackFactory.getOptMethod(RubyModule.class, "attr_writer"); Callback attr_accessor = CallbackFactory.getOptMethod(RubyModule.class, "attr_accessor"); Callback newModule = CallbackFactory.getSingletonMethod(RubyModule.class, "newModule"); Callback initialize = CallbackFactory.getOptMethod(RubyModule.class, "initialize"); Callback instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback public_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback protected_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "protected_instance_methods"); Callback private_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "private_instance_methods"); Callback constants = CallbackFactory.getMethod(RubyModule.class, "constants"); Callback const_get = CallbackFactory.getMethod(RubyModule.class, "const_get", RubyObject.class); Callback const_set = new ReflectionCallbackMethod(RubyModule.class, "const_set", new Class[] { RubyObject.class, RubyObject.class }); Callback const_defined = CallbackFactory.getMethod(RubyModule.class, "const_defined", RubyObject.class); Callback class_variables = CallbackFactory.getMethod(RubyModule.class, "class_variables"); Callback remove_class_variable = CallbackFactory.getMethod(RubyModule.class, "remove_class_variable", RubyObject.class); Callback append_features = CallbackFactory.getMethod(RubyModule.class, "append_features", RubyModule.class); Callback extend_object = CallbackFactory.getMethod(RubyModule.class, "extend_object", RubyObject.class); Callback include = CallbackFactory.getOptMethod(RubyModule.class, "include"); Callback rbPublic = CallbackFactory.getOptMethod(RubyModule.class, "rbPublic"); Callback rbProtected = CallbackFactory.getOptMethod(RubyModule.class, "rbProtected"); Callback rbPrivate = CallbackFactory.getOptMethod(RubyModule.class, "rbPrivate"); Callback module_function = CallbackFactory.getOptMethod(RubyModule.class, "module_function"); Callback method_defined = CallbackFactory.getMethod(RubyModule.class, "method_defined", RubyObject.class); Callback public_class_method = CallbackFactory.getOptMethod(RubyModule.class, "public_class_method"); Callback private_class_method = CallbackFactory.getOptMethod(RubyModule.class, "private_class_method"); Callback module_eval = CallbackFactory.getOptMethod(RubyModule.class, "module_eval"); Callback remove_method = CallbackFactory.getMethod(RubyModule.class, "remove_method", RubyObject.class); Callback undef_method = CallbackFactory.getMethod(RubyModule.class, "undef_method", RubyObject.class); Callback alias_method = new ReflectionCallbackMethod(RubyModule.class, "alias_method", new Class[] { RubyObject.class, RubyObject.class }); moduleClass.defineMethod("===", op_eqq); moduleClass.defineMethod("<=>", op_cmp); moduleClass.defineMethod("<", op_lt); moduleClass.defineMethod("<=", op_le); moduleClass.defineMethod(">", op_gt); moduleClass.defineMethod(">=", op_ge); moduleClass.defineMethod("clone", clone); moduleClass.defineMethod("dup", dup); moduleClass.defineMethod("to_s", to_s); moduleClass.defineMethod("included_modules", included_modules); moduleClass.defineMethod("name", name); moduleClass.defineMethod("ancestors", ancestors); moduleClass.definePrivateMethod("attr", attr); moduleClass.definePrivateMethod("attr_reader", attr_reader); moduleClass.definePrivateMethod("attr_writer", attr_writer); moduleClass.definePrivateMethod("attr_accessor", attr_accessor); moduleClass.defineSingletonMethod("new", newModule); moduleClass.defineMethod("initialize", initialize); moduleClass.defineMethod("instance_methods", instance_methods); moduleClass.defineMethod("public_instance_methods", public_instance_methods); moduleClass.defineMethod("protected_instance_methods", protected_instance_methods); moduleClass.defineMethod("private_instance_methods", private_instance_methods); moduleClass.defineMethod("constants", constants); moduleClass.defineMethod("const_get", const_get); moduleClass.defineMethod("const_set", const_set); moduleClass.defineMethod("const_defined?", const_defined); moduleClass.definePrivateMethod("method_added", CallbackFactory.getNilMethod()); moduleClass.defineMethod("class_variables", class_variables); moduleClass.definePrivateMethod("remove_class_variable", remove_class_variable); moduleClass.definePrivateMethod("append_features", append_features); moduleClass.definePrivateMethod("extend_object", extend_object); moduleClass.definePrivateMethod("include", include); moduleClass.definePrivateMethod("public", rbPublic); moduleClass.definePrivateMethod("protected", rbProtected); moduleClass.definePrivateMethod("private", rbPrivate); moduleClass.definePrivateMethod("module_function", module_function); moduleClass.defineMethod("method_defined?", method_defined); moduleClass.defineMethod("public_class_method", public_class_method); moduleClass.defineMethod("private_class_method", private_class_method); moduleClass.defineMethod("module_eval", module_eval); moduleClass.defineMethod("class_eval", module_eval); moduleClass.defineMethod("remove_method", remove_method); moduleClass.defineMethod("undef_method", undef_method); moduleClass.defineMethod("alias_method", alias_method); /*rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);*/ moduleClass.defineSingletonMethod("nesting", CallbackFactory.getSingletonMethod(RubyModule.class, "nesting")); }
public static void createModuleClass(RubyClass moduleClass) {; Callback op_eqq = CallbackFactory.getMethod(RubyModule.class, "op_eqq", RubyObject.class); Callback op_cmp = CallbackFactory.getMethod(RubyModule.class, "op_cmp", RubyObject.class); Callback op_lt = CallbackFactory.getMethod(RubyModule.class, "op_lt", RubyObject.class); Callback op_le = CallbackFactory.getMethod(RubyModule.class, "op_le", RubyObject.class); Callback op_gt = CallbackFactory.getMethod(RubyModule.class, "op_gt", RubyObject.class); Callback op_ge = CallbackFactory.getMethod(RubyModule.class, "op_ge", RubyObject.class); Callback clone = CallbackFactory.getMethod(RubyModule.class, "rbClone"); Callback dup = CallbackFactory.getMethod(RubyModule.class, "dup"); Callback to_s = CallbackFactory.getMethod(RubyModule.class, "to_s"); Callback included_modules = CallbackFactory.getMethod(RubyModule.class, "included_modules"); Callback name = CallbackFactory.getMethod(RubyModule.class, "name"); Callback ancestors = CallbackFactory.getMethod(RubyModule.class, "ancestors"); Callback attr = CallbackFactory.getOptMethod(RubyModule.class, "attr", RubyObject.class); Callback attr_reader = CallbackFactory.getOptMethod(RubyModule.class, "attr_reader"); Callback attr_writer = CallbackFactory.getOptMethod(RubyModule.class, "attr_writer"); Callback attr_accessor = CallbackFactory.getOptMethod(RubyModule.class, "attr_accessor"); Callback newModule = CallbackFactory.getSingletonMethod(RubyModule.class, "newModule"); Callback initialize = CallbackFactory.getOptMethod(RubyModule.class, "initialize"); Callback instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback public_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "instance_methods"); Callback protected_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "protected_instance_methods"); Callback private_instance_methods = CallbackFactory.getOptMethod(RubyModule.class, "private_instance_methods"); Callback constants = CallbackFactory.getMethod(RubyModule.class, "constants"); Callback const_get = CallbackFactory.getMethod(RubyModule.class, "const_get", RubyObject.class); Callback const_set = new ReflectionCallbackMethod(RubyModule.class, "const_set", new Class[] { RubyObject.class, RubyObject.class }); Callback const_defined = CallbackFactory.getMethod(RubyModule.class, "const_defined", RubyObject.class); Callback class_variables = CallbackFactory.getMethod(RubyModule.class, "class_variables"); Callback remove_class_variable = CallbackFactory.getMethod(RubyModule.class, "remove_class_variable", RubyObject.class); Callback append_features = CallbackFactory.getMethod(RubyModule.class, "append_features", RubyModule.class); Callback extend_object = CallbackFactory.getMethod(RubyModule.class, "extend_object", RubyObject.class); Callback include = CallbackFactory.getOptMethod(RubyModule.class, "include"); Callback rbPublic = CallbackFactory.getOptMethod(RubyModule.class, "rbPublic"); Callback rbProtected = CallbackFactory.getOptMethod(RubyModule.class, "rbProtected"); Callback rbPrivate = CallbackFactory.getOptMethod(RubyModule.class, "rbPrivate"); Callback module_function = CallbackFactory.getOptMethod(RubyModule.class, "module_function"); Callback method_defined = CallbackFactory.getMethod(RubyModule.class, "method_defined", RubyObject.class); Callback public_class_method = CallbackFactory.getOptMethod(RubyModule.class, "public_class_method"); Callback private_class_method = CallbackFactory.getOptMethod(RubyModule.class, "private_class_method"); Callback module_eval = CallbackFactory.getOptMethod(RubyModule.class, "module_eval"); Callback remove_method = CallbackFactory.getMethod(RubyModule.class, "remove_method", RubyObject.class); Callback undef_method = CallbackFactory.getMethod(RubyModule.class, "undef_method", RubyObject.class); Callback alias_method = new ReflectionCallbackMethod(RubyModule.class, "alias_method", new Class[] { RubyObject.class, RubyObject.class }); moduleClass.defineMethod("===", op_eqq); moduleClass.defineMethod("<=>", op_cmp); moduleClass.defineMethod("<", op_lt); moduleClass.defineMethod("<=", op_le); moduleClass.defineMethod(">", op_gt); moduleClass.defineMethod(">=", op_ge); moduleClass.defineMethod("clone", clone); moduleClass.defineMethod("dup", dup); moduleClass.defineMethod("to_s", to_s); moduleClass.defineMethod("included_modules", included_modules); moduleClass.defineMethod("name", name); moduleClass.defineMethod("ancestors", ancestors); moduleClass.definePrivateMethod("attr", attr); moduleClass.definePrivateMethod("attr_reader", attr_reader); moduleClass.definePrivateMethod("attr_writer", attr_writer); moduleClass.definePrivateMethod("attr_accessor", attr_accessor); moduleClass.defineSingletonMethod("new", newModule); moduleClass.defineMethod("initialize", initialize); moduleClass.defineMethod("instance_methods", instance_methods); moduleClass.defineMethod("public_instance_methods", public_instance_methods); moduleClass.defineMethod("protected_instance_methods", protected_instance_methods); moduleClass.defineMethod("private_instance_methods", private_instance_methods); moduleClass.defineMethod("constants", constants); moduleClass.defineMethod("const_get", const_get); moduleClass.defineMethod("const_set", const_set); moduleClass.defineMethod("const_defined?", const_defined); moduleClass.definePrivateMethod("method_added", CallbackFactory.getNilMethod(1)); moduleClass.defineMethod("class_variables", class_variables); moduleClass.definePrivateMethod("remove_class_variable", remove_class_variable); moduleClass.definePrivateMethod("append_features", append_features); moduleClass.definePrivateMethod("extend_object", extend_object); moduleClass.definePrivateMethod("include", include); moduleClass.definePrivateMethod("public", rbPublic); moduleClass.definePrivateMethod("protected", rbProtected); moduleClass.definePrivateMethod("private", rbPrivate); moduleClass.definePrivateMethod("module_function", module_function); moduleClass.defineMethod("method_defined?", method_defined); moduleClass.defineMethod("public_class_method", public_class_method); moduleClass.defineMethod("private_class_method", private_class_method); moduleClass.defineMethod("module_eval", module_eval); moduleClass.defineMethod("class_eval", module_eval); moduleClass.defineMethod("remove_method", remove_method); moduleClass.defineMethod("undef_method", undef_method); moduleClass.defineMethod("alias_method", alias_method); /*rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);*/ moduleClass.defineSingletonMethod("nesting", CallbackFactory.getSingletonMethod(RubyModule.class, "nesting")); }
3,236,918
private void addInstrumentation(CoberturaFile coberturaFile) { if (coberturaFile.isClass() && shouldInstrument(coberturaFile.getPathname())) { addInstrumentationToSingleClass(coberturaFile); } else if (coberturaFile.isDirectory()) { String[] contents = coberturaFile.list(); for (int i = 0; i < contents.length; i++) { File relativeFile = new File(coberturaFile.getPathname(), contents[i]); CoberturaFile relativeCoberturaFile = new CoberturaFile(coberturaFile.getBaseDir(), relativeFile.toString()); //recursion! addInstrumentation(relativeCoberturaFile); } } }
private void addInstrumentation(CoberturaFile coberturaFile) { if (coberturaFile.isClass() && shouldInstrument(coberturaFile.getPathname())) { addInstrumentationToSingleClass(coberturaFile); } else if (coberturaFile.isDirectory()) { String[] contents = coberturaFile.list(); for (int i = 0; i < contents.length; i++) { File relativeFile = new File(coberturaFile.getPathname(), contents[i]); CoberturaFile relativeCoberturaFile = new CoberturaFile(coberturaFile.getBaseDir(), relativeFile.toString()); //recursion! addInstrumentation(relativeCoberturaFile); } } }
3,236,919
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Check if we have class file if (isClass(entry) && shouldInstrument(entry.getName())) { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumented entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } }
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Check if we have class file if (isClass(entry) && shouldInstrument(entry.getName())) { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumented entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } }
3,236,920
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Check if we have class file if (isClass(entry) && shouldInstrument(entry.getName())) { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumented entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } }
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Check if we have class file if (isClass(entry) && shouldInstrument(entry.getName())) { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumented entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } }
3,236,921
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Check if we have class file if (isClass(entry) && shouldInstrument(entry.getName())) { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumented entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } }
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Check if we have class file if (isClass(entry) && shouldInstrument(entry.getName())) { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumented entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } }
3,236,922
private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); } catch (Throwable t) { logger.warn("Unable to instrument file " + file.getAbsolutePath(), t); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (Throwable t) { logger.warn("Unable to instrument file " + file.getAbsolutePath(), t); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, CustomAttribute.getExtraAttributes(), false); } catch (Throwable t) { logger.warn("Unable to instrument file " + file.getAbsolutePath(), t); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (Throwable t) { logger.warn("Unable to instrument file " + file.getAbsolutePath(), t); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
3,236,923