ANTLR4 Issue while adding Comments in Hidden Channel to Tree - antlr

I'm working on adding the comments in hidden channel back to the tree.
I do this using stream.getHiddenTokensToRight and add the child (comment token) back.
But I would need the hidden comment token node to come under another parent node (say "Comments"). The "Comments" node would be added to the main tree and its subchild would be the hidden comment token node. How is this possible? Can i create a new node? or duplicate the hidden comment token with a modified text?

Related

htmx: Update parent-Fragment if child-form is valid

I am learning the "html fragments over the wire" approach of htmx.
I have a "parent" tag in my HTML page which contains a child which is a form.
Case1: If the child form gets submitted and is not valid, then I want to re-display the child form (hx-swap="outerHTML"). This works fine.
Case2: if the child form gets submitted and is valid, then I want to re-fresh the parent.
I had a look at hx-swap-oob, but this needs to be an attribute of the HTML send from the serve to the client.
This is possible, but it is a bit dirty to get the attribute into the parent tag.
Is there a way to trigger something like oob, but why http-header?
Depending on the rest of your website, I'd suggest using the hx-trigger response header to trigger a new event on your website when your form is posted successfully. You can use htmx, hyperscript, javascript, or anything else listen for this event and take the necessary action.

Force GET_ONE request when navigating to Show page

As I believe is common in many APIs, ours returns a subset of fields for a record when it is part of a List request, and more details when it is a single-record request to its Show endpoint.
It seems that react-admin attempts to avoid doing a second request when loading a Show page (possibly re-using the record data from List?), which results in missing data. Refreshing the page fixes this, but I'm wondering if there is a setting that will force a GET_ONE request on every Show page load.
There are no setting for that. However, this should be achievable with a custom saga which would listen to LOCATION_CHANGE action (from react-redux-router) and dispatch a refreshView action (from react-admin) when the new location pathname ends with /show.
Edit: however this is very strange. We only use the data we already got from the list for optimistic display but we still request with a GET_ONE when navigating to a show page from the list. Do you have a codesandbox showing your issue?

Remove nodes from the graph without reloading the web page in cytoscape.js

I have a graph of molecular interactions that takes nodes and edges from a query to my database. I also have two buttons as node labels: "Remove" and "Add" (where "remove" should remove the selected node, while "add" should expand to first neighbors).
I would like to add a function that removes the selected node (on click) without reloading the web page, but just reloading the graph (I want the selected node to disappear from the graph). So, the problem is not the function cy.remove but rather the graph reloading.
I am new to cytoscape.js (let's say to javascript), so I have no idea on how to reload a graph and where to put the remove and reload functions. To date I am only able to pass the ID of the node I want to remove and/or expand via GET method using php. This actually works, but it reloads the web page making a new query to my database, and it becomes tricky when one wants to add and remove a lot of nodes.
Could anyone provide me some simple example code that explains how to reload a graph after a button click, keeping all nodes except the removed one?
Sorry if it is a stupid question
Thanks
$('#button_deleteNode').click(function(){
cy.remove(nodeID);
});

Why is 'Components' tree structure empty - RTC source control

In RTC source control when I expand the Team Area I have this view :
I can see the stream and its components. What decides if components should appear in Components folder ? As can be seen in screenshot this is currently empty. For other developers this is populated with components even though they cannot see the streams ?
You see all components that are visible to you.
In other words, it depends on the ownership for each component.
Any component owned by the project area or your Team Area would be displayed in the Component section.
Any component owned by a single resource (a member of the RTC project area) or another Team Area (that you aren't part of) won't be displayed there.
The same would apply for the streams: check the owner of those streams to understand why a resource doesn't see it.
Whats the point of hiding a stream if the components themselves are not hidden ?
The point (in hiding Stream even though it doesn't hide component) is preventing users to deliver to that stream: they can still work on the same set of component (visible because of the right ownership), but they can no longer see (and deliver to) a given Stream.

BlackBerry 10 Cascades app stuck affecting property

I have an issue with a list/detail pattern. I have an Article class, inheriting from QObject, defining some properties (title, updated and content being the ones that matters for now). To populate my (QML) ListView, I have a C++ GroupDataModel, filled with some Article*. Here's my list's onTriggered:
onTriggered: {
if (indexPath.length > 1) {
currentArticle = dataModel.data(indexPath);
var page = articlePageDefinition.createObject();
nav.push(page)
}
}
As you can guess, the articlePageDefinition defines a page using the upper currentArticle property.
Now, when I display the articlePage once, it's working fine. I can go back, click on the same list item, display the same Article details, works great. But when I pick a second article, the app kind of freezes. I can go back in my navigation pane, but I can't click on list items anymore. I tried to add some logs, the onTriggered is stuck on currentArticle = dataModel.data(indexPath);. At this point, I can log every property of dataModel.data(indexPath) without any issue. I tried to not create/push the page, simply affect currentArticle and display some of its properties, it's working fine too. I really don't understand what I am doing wrong here, any help appreciated.
In case you need to see more code, everything is here: https://github.com/Kernald/tt-rss-bb10/tree/e29e3b616aa179dd42f66804ecc20a6a45b6bb22
Here what can cause the problem your are having:
You create the articlePage and bind it's data to the "currentArticle" global variable
When you go back the articlePage is not deleted.
You open an other instance of this same articlePage. The last one still bind its data to the same currentArticle instance.
When you go back and click another item: the previous articlePage still exists in memory. It binds to "currentArticle". The problem is, it's not the data of "currentArticle" that has changed but the object referenced by "currentArticle". The Qml binder just fails then.
I had a similar behavior of my app, but I did not inspect your github code if the reason can be the same. I think you can verify that more quickly than me.
When removing and adding a list item with the same index, the code gets stucked. I removed an entry on user action and added a new one at that place, and it got stuck. This is a known issue to BB10, I found here: https://developer.blackberry.com/cascades/download/releasenotes/#known