From b181e542108373930d5e41c72e5d42b78cc14be7 Mon Sep 17 00:00:00 2001 From: Patrick Tasse Date: Mon, 6 Jun 2016 16:59:42 -0400 Subject: [PATCH] doc: Bug 495211: Update developer guide for ITmfStateSystem API Change-Id: I20bad86bfbd2bde033e04b8ea215fe0a6d2ac847 Signed-off-by: Patrick Tasse Reviewed-on: https://git.eclipse.org/r/74725 Reviewed-by: Hudson CI Reviewed-by: Matthew Khouzam Tested-by: Matthew Khouzam --- .../doc/Developer-Guide.mediawiki | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki b/doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki index 57e7b9c733..649f74428e 100644 --- a/doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki +++ b/doc/org.eclipse.tracecompass.doc.dev/doc/Developer-Guide.mediawiki @@ -1383,6 +1383,23 @@ analysis plugin will normally ship both the state provider and the view, and they will have been written by the same person. In other cases, it's possible to use getSubAttributes() to explore the organization of the attribute tree first. +===== optQuarkAbsolute()/optQuarkRelative() ===== + +These two methods are similar to their counterparts getQuarkAbsolute() and +getQuarkRelative(). The only difference is that if the referenced attribute does +not exist, the value ITmfStateSystem#INVALID_ATTRIBUTE (-2) is returned instead +of throwing an exception. + +These methods should be used when the presence of the referenced attribute is +known to be optional, to avoid the performance cost of generating exceptions. + +===== getQuarks() ===== + +This method (with or without a starting node quark) takes an attribute path +array which may contain wildcard "*" or parent ".." elements, and returns the +list of matching attribute quarks. If no matching attribute is found, an empty +list is returned. + ===== waitUntilBuilt() ===== This is a simple method used to block the caller until the construction phase of @@ -1481,7 +1498,7 @@ state system activities. ==== AttributeNotFoundException ==== -This is thrown by getQuarkRelative() and getQuarkAbsolute() (but not byt the +This is thrown by getQuarkRelative() and getQuarkAbsolute() (but not by the -AndAdd versions!) when passing an attribute path that is not present in the state system. This is to ensure that no new attribute is created when using these versions of the methods. -- 2.34.1