/** * Opens a given topic of the OkapiWiki. * @param topic the title of the topic/page. */ public static void openWikiTopic (String topic) { try { // Resolve spaces topic = topic.replace(' ', '_'); //TODO: get the base URL from a properties file Util.openURL(new URL(String.format("http://okapiframework.org/wiki/index.php?title=%s", topic)).toString()); } catch ( MalformedURLException e ) { e.printStackTrace(); } }
@Override protected Event handleEndBatch (Event event) { extractor.completeExtraction(); String finalPath = Util.fillRootDirectoryVariable(params.getOutputPath(), rootDir); LOGGER.info("Output: {}", finalPath); LOGGER.info("Candidate terms found = {}", extractor.getTerms().size()); if ( params.getAutoOpen() ) { Util.openURL((new File(finalPath)).getAbsolutePath()); } return event; }
@Override protected Event handleEndBatch (Event event) { matcher = null; if ( writer != null ) { writer.close(); writer = null; } if ( prnWriter != null ) { prnWriter.close(); prnWriter = null; } if ( tmx != null ) { tmx.writeEndDocument(); tmx.close(); tmx = null; } Runtime.getRuntime().gc(); if ( params.isAutoOpen() && ( pathToOpen != null )) { Util.openURL((new File(pathToOpen)).getAbsolutePath()); } return event; }
Util.openURL("http://translate.google.com/toolkit/workbench?did="+docId);
private void generateReport () { try { startWaiting("Generating report..."); String rootDir = (qcsPath==null ? null : Util.getDirectoryName(qcsPath)); session.generateReport(rootDir); String finalPath = Util.fillRootDirectoryVariable(session.getParameters().getOutputPath(), rootDir); if ( session.getParameters().getAutoOpen() ) { Util.openURL((new File(finalPath)).getAbsolutePath()); } } catch ( Throwable e ) { Dialogs.showError(shell, "Error while generating report.\n"+e.getMessage(), null); } finally { stopWaiting(); } }
Util.openURL("file:///"+reportPath);