-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for data provider capabilities in server and InAndOut analysis #138
base: master
Are you sure you want to change the base?
Add support for data provider capabilities in server and InAndOut analysis #138
Conversation
b9b7711
to
b86760d
Compare
gen.writeObjectFieldStart("capabilities"); //$NON-NLS-1$ | ||
gen.writeBooleanField("canCreate", cap.canCreate()); //$NON-NLS-1$ | ||
gen.writeBooleanField("canDelete", cap.canDelete()); //$NON-NLS-1$ | ||
gen.writeEndObject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be the same as using writeObjectField on the capabilities?
The difference could be that we are fixing the capabilities to serialize even if new ones are added to the class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method getCapabilities
returns an instance of IDataProviderCapabilities
, but it doesn't guarantee that it is DataProviderCapabilities object which has 2 boolean fields canDelete
and canCreate
. It could be just an anonymous class that returns hardcoded values for methods canDelete
and canCreate
. For that case, the serialization would cause an exception. To rely on writeObjectField we would have to have jackson annotated classes. Not sure if it would work if the annotation is on the interface methods.
Besides, we have not added the jackson dependency to Trace Compass core for that, because our stand was that the TSP client to trace server interface is not the same than the trace server to Trace Compass core interface, where the latter is the Trace Compass interface, that is also used in classic Trace Compass. If we had started without the legacy code and the TSP as main interface, then we probably would have done it differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, it would be possible to re-visit how internal data structures are serialized in over the TSP using jackson annotation. But that should be a separate task for all TSP data structures.
Signed-off-by: Bernd Hufmann <[email protected]>
Signed-off-by: Bernd Hufmann <[email protected]>
b86760d
to
e5a48d7
Compare
Requires eclipse-tracecompass/org.eclipse.tracecompass#198 to be integrated.
see also eclipse-cdt-cloud/theia-trace-extension#1158
Signed-off-by: Bernd Hufmann [email protected]