Is there anywhere that you can browse the WebKit source code easily and be able to "go to definition" for information about every variable, type, and function?
Something like the Linux Cross Reference, Mozilla's DXR, or woboq Code Browser.
Which specific WebKit port were you interested in? We managed to get the current Qt5 QtWebKit to compile with the code browser :)
http://code.woboq.org/qt5/qtwebkit/
Related
Isn't there some shortcut that takes you to context specific help?
For example, if I have my cursor on System.out.println, isn't there some shortcut key I press that takes me to the documentation on this particular method or class where the method is declared?
View documentation ("Quick Documentation" action):
Ctrl+Q
View external documentation ("External Documentation" action):
Shift+F1
For this to work you need to configure your project so that IntelliJ knows where to look for it (see here).
Just to add an answer for the Mac users out there try using F1 for Quick Documentation.
Check out https://www.jetbrains.com/help/idea/viewing-reference-information.html#external-docs
In the Project Structure window > Platform Settings (Ctrl+Shift+Alt+S) under SDKs you can add a documentation url for the specific SDK version: under Documentation Paths tab click on the correct + icon (or use Alt-S). In IntelliJ 2019.3 when you want to add the url it gives you by default the correct url so you can just hit Ok:
JDK 1.8: https://docs.oracle.com/javase/8/docs/api/
JDK 11: https://docs.oracle.com/en/java/javase/11/docs/api/
JDK 13: https://docs.oracle.com/en/java/javase/13/docs/api/
When you return to your source code you can the select a Java keyword and hit Shift-F1 and your browser will open and jump automatically to the correct docs for the keyword.
How to automatically reload Clojure code?
I have watched the presentation. And in there they use some hot swap Clojure technology that reloads code whenever changes are made into source files. I can run the code, but I can not observe the effect of auto reload. How is it possible to reload the code?
the source code.
There are many ways to reload code, depending on the situation:
Emacs/CIDER shortcuts to reload a file. Probably Rich is doing something similar. Also see this: How to reload a clojure file in REPL
watch files and reload the code (figwheel for frontend development does that, test plugins as well as CIDER shortcuts specifically for running tests, boot has a watch task...)
a middleware for the web server you use (ring for example has ring.middleware.reload/wrap-reload for this, pedestal comes with one as well, other webservers like yada play well with component)
a component workflow works also, there is an example of an auto-reloadable system with holy-grail
(I didn't fully re-watch this video, but these notes are from my observations after skipping through the video and making educated guesses)
From what I re-watched of this video it looks like Rich is evaluating the code in a running repl. This allows him to change the code, evaluate it, and see different behavior.
Many editors have support for evaluating code in a buffer in a Clojure repl. Here is some documentation on using CIDER with Emacs to get to interactively play with your code.
Unrelated to the video in question, if you are using ring for web development. You can use the wrap-reload middleware to have your code automatically reloaded when a file has changed and a request hits your web app. This is extremely useful when developing a Clojure web application.
For automatically reloading and running your clojure.tests I recommend lein-test-refresh. It is a Leiningen plug-in that monitors your project for file changes and when something changes it reloads and runs your tests. If you have tests for your project this greatly speeds up development.
Use mount to manage the starting and stopping of your components. For example in a backend web app, you'll want to startup the db before you start the webserver probably.
Then in emacs you can have:
(defun cider-repl-refresh ()
(interactive)
(save-some-buffers)
(with-current-buffer (cider-current-repl-buffer)
(goto-char (point-max))
(insert (concat "(require 'clojure.tools.namespace.repl) "
"(clojure.tools.namespace.repl/refresh)"))
(cider-repl-return)))
If you are not super fond of Emacs (I love Emacs, but hey not everybody does) LightTable is a very nice option for Clojure/ClojureScript interactive programming too.
For developing ClojureScript (Clojure that compiles to Javascript) LightTable and Figwheel are a really nice pair.
In my opinion LightTable has some advantages against Emacs (I never got cider to work perfectly with ClojureScript) for the webdev side, LightTable is basically a specialized version of Chrome, because it is built on top of Electron.
Check this documentation on the Figwheel GitHub page: Running Figwheel with LightTable:
If you are using Cursive IDE in IntelliJ, there is a special REPL tool which you have to setup to get the functionality you are looking for. It has many features vs. "lein repl" in a terminal window.
Full tutorial here: https://cursive-ide.com/userguide/repl.html
However, its very easy to setup a default instance:
Right click project.clj/deps.edn -> "Create Repl for...". Default settings are fine. Hit ok/apply.
Right click project.clj/deps.edn -> "Run Repl for..." (a repl window will open)
See Tools->Repl for a list of commands, such as:
switch to repl window: Ctrl+\
reload current file in repl: Alt + Shift + L
send function defn to repl: Alt + Shift + M
... and more
In addition you'll get full code completion, syntax highlighting, etc. when writing in a REPL.
I am using Mocha+Chai for a current Node.js project. My IDE is Webstorm 11.
Unfortunately, it seems Webstorm has no way of figuring out how language chains in Chai's should/expect are supposed to work. The following is commonplace:
I have tried explicitly setting both Chai and Chai-DefinetlyTyped as libraries for my project via Settings->Javascript->Libraries, but this does not resolve anything.
For the sake of tool support, I have considered dropping expect/should for assert instead, as this works perfectly. However, I very much prefer the style of expect/should, so it would be amazing to see a solution to this.
Problem is caused by weird dynamic way these chains are defined. As a workaround I can suggest using chai.d.ts:
Open "Settings | Languages & Frameworks | JavaScript | Libraries"
Click "Download..." button and select "TypeScript community stubs"
Find "chai" and click "Download and Install".
Is it possible to retrieve the URL from an active firefox session with Swift or Objective-C. So far i was able to retrieve the Name of the actual tab with applescript but not the URL.
What would be the right way?
Not without installing something like Selenium (or, perhaps, only Selenium), AFAIK. If you do use Selenium, you can use various languages to get the "WebDriver"'s current_url property.
Without Selenium, if you want to get kind of clunky (but effective), you can use System Events (AppleScript) to do a command-l (ell) then command-c to highlight the url field and copy it to the clipboard, then access that.
Even with Swift or ObjC, you would still need a Scripting Bridge, and Firefox's scriptability is sparse, as you have discovered. However, AppleScript can do this with either Safari or Chrome:
tell application "Google Chrome"
URL of tab 1 of window 1
end tell
--> "https://www.lds.org/?lang=eng"
tell application "Safari"
URL of tab 6 of window 1
end tell
--> "http://www.nps.gov/webcams-mora/mountain.jpg"
This is one of my biggest turn offs from the newer versions of XCode(ie 4.5+) is the following: in earlier versions.. when you option click a system defined function.. you get a bubble that offers you a link that takes you directly to the function definition in organizer:
but on XCode 4.5 and later.. that changed: the exact link of the function is no longer provided.. instead you can only click on the reference of the entire class!
any idea how that can be changed? Another problem I have is the fact that I just couldn't figure out how to do offline documentation viewing on xcode 4.5 (it worked fine in earlier versions.. and yes i did download all the documentation locally and followed all the SOF links.. but no luck!)..
Make sure you download all the documentation locally via XCode->Preferences. Once it's local there should be no problem accessing specific functions through the popup - it says "Class Reference" but it automatically opens the relevant documentation within the class reference.