From my Eclipse plugin, I want to execute a command and show the results in the Console view (and later do some formatting and hyperlinking and pattern matching, which is done via the org.eclipse.ui.console.consolePatternMatchListeners extension point AFAIK). My question is how to do this? In plain Java, I would use a ProcessBuilder. Do I have to do this and bind the stdout/stderr somehow to a newly created console page or is there another way? Any pointers/experiences are appreciated.
Using Eclipse FAQ, this SO question and the ProcessBuilder, I managed to lazily create my console, show it and echo the input stream of the process to the console's message stream (instead of System.out).
Related
I was wondering how I can create a topic in the console of fire base. I see there is android code to do it from the application but that takes time to reflect on the console. I don't even know where to look if it was created. Also can this be done in Javascript compared to java?
Example code for JS would be nice if I cannot do it through the console.
Thanks,
You don't need to do anything in the console to create a topic. Just start using it by string name on both the server and client, and it will just work.
I have recently started working on a program that should not be changed much and there are problems that it closes properly with Robot Framework. The method that came to my mind now was that I could get the reports before the test end.
So I have this Question:
Is there a possibility or keyword in Robotframework that I can use to get reports before the test is done?
Is there a possibility or keyword in Robotframework that I can use to get reports before the test is done?
No, there is not. Robot creates the reports as an in-memory xml document. It doesn't write the data to disk until the tests are finished. It then runs a post-processing step to convert them to html.
As #Bryan wrote, there is no way to get report.html during robot runtime as it is generated in postrun step.
However, you may use listener to get feedback from robot about execution status. For instance, in RED Robot Editor IDE, it is used to populate Execution View (see screenshot at the bottom):
http://nokia.github.io/RED/help/user_guide/launching/ui_elements.html
More about listener API: https://github.com/robotframework/robotframework/blob/master/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.rst
I want to create a custom report. Response format for sonarqube web service API /api/issues/search is JSON or XML. How can I use that response to create a html or CSV file using "unix shell without using command line tools" so that I can use it as a Report. Or is there any other better way to achieve this?
you can generate a html file if you run an analysis in the preview mode http://docs.sonarqube.org/pages/viewpage.action?pageId=6947686
It looks as if the SonarQube team has been working hard to not allow people to do this. They appear to want people to purchase an Enterprise Subscription in order to export reports.
An old version of sonar-runner (now called sonar-scanner) had an option to allow local report output. But that feature is "no more supported".
ERROR: The preview mode, along with the 'sonar.analysis.mode' parameter, is no more supported. You should stop using this parameter.
Looks like version 2.4 of Sonar Runner does what you want. If you can find it. Of course they only have 2.5RC1 available on the site now.
Using the following command should work on version 2.4:
sonar-runner -Dsonar.analysis.mode=preview -Dsonar.issuesReport.html.enable=true
There at least two open-source projects that query the SQ API to generate reports in various formats.
https://github.com/cnescatlab/sonar-cnes-report/tree/dev (Java)
https://github.com/soprasteria/sonar-report (JavaScript/Node)
At the time of writing both are active.
I am using Symfony2 Console as a stand alone component and I am looking for a way to copy some text on clipboard with a command. It must be for all Operating Systems.
For example:
php cli/console smth:copy
And when the command is run it must copy some text to user clipboard.
I've have google it and didn't found anything.
Is that possible an if is it how can i accomplish this task?
I'm implementing a very light weight (embedded) OSGi framework which runs on a target piece of hardware. To attach a console I'm using org.apache.felix.gogo.shell and org.apache.felix.shell.remote.
To date, I've logged all custom messages using System.out.println which has worked fine, but now that I'm using the remote console I require something that will allow me to 'print' my messages to the OSGi console (and hopefully appear both on the target's console as well as the telnet console provided by felix.shell.remote).
I'm guessing there must be a way to get a handle to an OutputStream (or similar) to do this; My question is how? It seems that most people redirect their stdout etc. to solve problems like this.
I'm using declarative services, so I was hoping to be able to setup a component which attaches a referenced service (not important, but would make it nice and neat).
Any help is greatly appreciated.
The best way is to use logging for custom messages using the OSGi Log Service. That way you can get recent logs from the LogReader service from inside your shell or webconsole. If you insist on using popular frameworks like log4j etc. then you can get a bridge with Pax logging.
Alternatively, redirecting the output to a file in a known location works. You can then make a command in gogo that views that file or provide a tail function that continuously displays the new parts of the file.