I want to create Mylyn tasks through code. I searched for Mylyn javadoc but could not find anything relevant. Any help on this would be highly appreciated.
Thanks
You can use one of these (I found it via NewTaskAction)
TasksUiUtil.openNewLocalTaskEditor(shell, null);
TasksUiUtil.openNewTaskEditor(shell, null, TasksUiUtil.getSelectedRepository());
TasksUiUtil.openNewTaskEditor(shell, null, null);
TasksUiUtil is in org.eclipse.mylyn.tasks.ui package, this is public API. Mylyn doesn't have very good Javadocs :-(
Related
I'm using a SpringBoot 2.2.6 WebApplication with Maven 3. I'm also using spring-integration-http for my endpoint, that's mean that my endpoint are similar to follow:
#Bean
public IntegrationFlow test(CommonTransformer<TestDTO, String, TestMapper> testTransformer, Jackson2JsonObjectMapper obj) {
return IntegrationFlows.from(Http.inboundGateway("/foo/{name}")
.requestMapping(m -> m.methods(HttpMethod.GET))
.payloadExpression("#pathVariables.name")
.replyChannel(Constants.REPLY)
.requestPayloadType(String.class))
.transform(testTransformer)
.transform(new ObjectToJsonTransformer(obj))
.channel(Constants.HTTP_REQUEST)
.get();
}
Now I would like to create a OpenApi docs for my endpoint and, if it's possible, a swagger GUI interface to test it.
I have read several official/unofficial docs and I find interesting docs here another much interesting example here.
My preoccupation is that many of this articles are dated before 2020 (for example one of these use deprecated annotation likes #EnableSwagger2Mvc) but I can't managed to find out something more updated.
Is anyone aware of a more up-to-date procedure?
-------------------------- UPDATE --------------------------
First of all Thanks #ArtemBilan for yor response.
Yes I read that article and I'm not new to documenting my REST API. With springdoc-openapi-ui I'm able to create a .json file that, if putted in some editor like http://swagger.io or if used with a specific maven plugin can create a client (in both spring java and Angular language) ready for use.
I have tried the springfox way (above) to documenting my spring-integration-http but it sucks! It generate some useless files to reproduce the call via CURL..
Is not what I'm looking for. I must (the STO asks) documenting my endpoint like the .yaml you can find for the example Swagger Pet Store.
And it seems there's no way with this spring-integration-http to do so..
Any help is appreciate.
There is pyflink.datastream.MapFunction in Flink Python API Docs. Meanwhile there is no RichMapFunction. Could somebody tell me why?
All the functions in PyFlink are rich. You can see that, pyflink.datastream.MapFunction extends pyflink.datastream.Function which has a open method.
I'm not sure why it's missing from PyFlink, but RichMapFunction is completely unnecessary. Anything you could do with a RichMapFunction can be done with a ProcessFunction or KeyedProcessFunction instead.
How can find what is included in the #containment annotation? I can not find that in the documentation online, that refers only to grammar-spec and nothing more? I'm talking about trying to obtain information/facts from the M3 model..
As an example:
scheme=="java+variable" or some other condition is used in a comprehesion to filter, how do you know what can be used to find certain thing??
Thanks
The documentation is not complete, but these pages are relevant:
http://tutor.rascal-mpl.org/Rascal/Libraries/lang/java/m3/m3.html#/Rascal/Libraries/analysis/m3/Core/Core.html
http://tutor.rascal-mpl.org/Rascal/Libraries/lang/java/m3/m3.html
I would also have a look at the code in these files:
https://github.com/cwi-swat/rascal/blob/master/src/org/rascalmpl/library/lang/java/m3/Core.rsc
https://github.com/cwi-swat/rascal/blob/master/src/org/rascalmpl/library/lang/java/m3/AST.rsc
They can be found in the rascal navigator view in Eclipse as well. In particular the core file contains all to know about the relations and locations in the java m3 model.
For example :
If I had http://somepage.com/somefolder/someresouce?p1=value&p2=value&p3=value
I would like to see a column that would display the value of p2 if it existed in the request.
I googled, asked people around but can't find a good answer.
If think creating a dissector might help, but I don't want to write a new dissector for http.. that's an overkill.
And there is no http.request.queryParams["p2"] syntax for use of Custom Column type.
Thanks in advance!
Edit : I solved my own Question, adding the best implementation so far in my own answer below.
Well, the solution was indeed in dissectors.
Wireshark help is not very good, the examples are ok though.
The main problem was that wireshark help defines that you can write your lua script, and place it in the plugins directory, which is searched recursively for lua files.
I did place my lua there and nothing worked, After almost 2 hours of fiddling, I found out instead of putting it in the plugins directory, it had to be in plugins//myScript.lua in order to work...
Now just to share my work :
To answer my own question :
http://pastebin.com/eANEut92
I'd like fileName, lineNumber and stack traces to automatically be provided by Rhino for any errors.
I've been told that I need to set FEATURE_LOCATION_INFORMATION_IN_ERROR on the current context, but I'm not sure how to do this in code.
Does anybody have an example of turning this feature on so that I can see stacktrace dumps on crashes?
I'm using Rhino as part of Narwhal/Jack, and so that complicates things a bit, and I think the easiest way to at least get moving forward is if I can set it through code.
Thanks.
I solved this by overridding Context and providing my own implementation for hasFeature(int) that returned true for the feature(s) I want. Pretty lame that mozilla didn't put that in config somewhere.