How to log file data onclick on vscode workspace using onDidChangeSelection event - visual-studio-code

I want to get file data on file click on workspace.
For example I have todo-list project folder and a file named app.js. I want to log app.jss' vscode metadata in debug console on file click in tree-view workspace.
todo-list > app.js
Upon searching in docs, I saw onDidChangeSelection event. I want to use the event and see if I can log any data on file selection in tree-view.
onDidChangeSelection: Event<TreeViewSelectionChangeEvent<T>>
Can anyone please help me on how to use onDidChangeSelection event? I already tried scanning vscode.window and vscode.TreeItem and still can't find the event.
And if anyone had already tried logging file data on file click in tree view, what vscode event/api did you use?

Related

Is there any API in NatTable examples which shows source code upon clicking view source link?

I just wanted to know how View Source link is working which opens source code of a particular example NatTable class upon clicking. Same kind of requirement is there. So just wanted to know whether is there any built in API which fetches source code of a class.
No there is no such open source API. For the examples we simply include the sources in the examples jar file and have a mechanism that loads the .java file from the jar and opens it in a new Shell.

How VSCode debugger stepin to open a new file?

I am implementing a vscode debugger, with stepin function, I need to step into a new file, but I don't know how it works now, how it opens a new file for step into? and another question, this new file will be loaded from server dynamically, it is not in the local workspace. I don't know how to do it in DAP? please help!! Thanks!
I have the answer and post here for a reference.
VSCode use StackTraceRequest to set the stop line number and file.
It will be called after a stopped event.
so for the response of StackTraceRequest, we can set the StackFrame object, and the source object in it is for file.
https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame

{Netbeans}The form file does not contain valid XML.Form cannot be opened.Contents is not allowed in prolog

I was recently working on a really huge project in netbeans. I saved it in my desktop, and then proceeded to save it also in my USB. However, the next day, when I learned it could be for a later date, I deleted the one in my USB.When I put on the one in my desktop, all the work I had done was not saved on it, including the making of new JFrames etc. So I used a program to recover my deleted files. I now have loaded them into the netbeans IDE< however, there is an error sign next to most of them. When I click on a class inside my project with the error,an error message comes up before I can access it. It says "The form file does not contain valid XML.Form cannot be opened.Contents is not allowed in prolog." When I press "OK", my class has "coding" which looks like:
W�'6��G��ԧ��(g&�Cd�nw|7�\ej��
�;���كG�s=�Bl+��6�r�#ma���'�f�T�9Kx�q�M�G�t�q� �:���� \!�%İ��P�&!�[�R���`�,+��U���"���Ј���yF&mÛ�
�
Y ?/,8��#�t:�ԇ
��lOѪ|T�^?v"
....that.
And when I go to "design view" that message comes up again. What should I do? What CAN I do? I really need the bulk of my project to finish it in time!!!Oh, the project is for tommorow, so the quicker answer the better :'(
right click on the latest file from History ->revert (the .form)
Go to the history of the file and copy the content of .form file then go to directory and open the 0byte file .form by the editor and paste the content! I have done this and it worked for me.

GWT Browse files/directories

Here is my requirement:
In my application, I want to get a path of file from user and process the file accordingly.
I am providing a text box in which user can directly enter the path.
Or user can opt to choose a file by clicking on Browse button and selecting a file.
Which widget shall I use to browse local files and directories?
I found one widget called FileUpload but whenever I get the fileName by fileUpload.getFileName, it does not give me the whole path.
You don't need the whole path.
Please see the links below.
The first link covers the client side and the second one the servlet side.
http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload
http://commons.apache.org/fileupload/using.html

Trying to get along with Interwoven

I am to create a new design (CSS & HTML) for a web site which is created using Interwoven ContentCenter Professional.
Now, I can see the existing files in CMS (Interwoven) but, I can't make changes. My changes are displayed only when I'm in edit mode. Nothing in the live page. I tried to submit, create editions of files but still no good.
How should I create or edit pages in Interwoven CMS?
Thanks.
If you're talking about generic pages, then once you are finished you have to click on the Generate option, then choose a directory and click Finish. Last thing you should do is to choose yeswhen it asks you to Re-generate the page.
What you are trying to do is just creating a new file, not generating a file from TeamSite's Formpublisher. It is just like if you are in Windows Explorer and creating a new file. In order to generate a file from a form entry, you need to be in the templatedata directory, ex: /default/main/branch1/WORKAREA/wa1/templatedata/category/type(on unix) or Y:/default/main/branch1/WORKAREA/wa1/templatedata/category/type (on Windows). There should be a file call datacapture.cfg there. There is another directory called data under the above path which stores your data content record (dcr) that are created from the form. This is the file that you can use to generate which will use the (tpl) file under the presentation directory.