What is the easiest way to show to view the MPS log? - mps

The MPS log can be found in $HOME/.MPS*/system/log/idea.log.
Do I really need to remember this or is there an easier way to find the log?
This question is meant to increase searchability of practical MPS issues.

In the menu, go to Help --> Show Log in Explorer. This will bring you directly to the location of the idea.log file.

Help --> Show Log in Explorer
But as MPS gives you freedom to write plugins, you can write one to have a customized log viewer for your application.

Related

Android Studio / IntelliJ: Highlight custom strings in the log (or logcat)

Android and IntelliJ both have support for highlighting log messages based on the log level.
I'd like to go a step further and also highlight "my" classes, means classes from "my" packages - in a different way so that I can recognize them quickly in the log. So I'd like to see an option where I can define a custom string and then give lines which contain this string a custom highlighting. The "string" could be a package name, a debug string, or whatever.
Do you know if such a solution exists already? Maybe there's already a plugin for that?
I'm not aware of anything specifically targeting this use case, but I have workarounds for you.
Search
Focus the LogCat window by clicking into it and the press Ctrl+F, this brings up the local search bar and you can enter your package name:
Filter logs
This solution is from my question: How can I disable Android's internal logging for specific tags (e.g. AbsListView, GestureDetector, endeffect)
If you're having problems with spamming log lines you don't care about just filter them out, for example I have this configuration:
^(?!AbsListView|endeffect|GestureDetector|CustomFrequencyManager|ApplicationPackageManager|PersonaManager|ProgressBar|ViewRootImpl|MotionRecognitionManager)
^(?!Unable to resolve superclass of|Link of class|DexOpt: unable to opt direct call|Could not find class|Could not find method|VFY: )
This leaves only the most important/relevant log lines:
your app's logs
dalvikvm's Garbage Collections
StrictMode
and other unexpected things
High-level logging
I don't suggest you do this, included for completeness. Use only Log.wtf and Log.e for your own logging and set colors/LogCat view's level filter accordingly. This is not really useful if you want to have 5 levels of logging. There may be some sneak-in log lines, but less than normal.
What about the plugin https://plugins.jetbrains.com/plugin/7125-grep-console.
I use it and it is quite good.

Android Studio Plugin - Show Image In Editor

I'd like to be able to display an image below a class-level javadoc in Android Studio. My assumption is that I should write a plugin to make this happen.
Does anyone know what I need to do to get an image (JPEG or PNG) to display below a class-level javadoc comment in a Java class file?
I looked into basic information about creating an IntelliJ IDEA plugin but I have no idea where to look to accomplish my task.
This is not possible in the current version of IntelliJ IDEA. The editor can display only text, and does not support embedding of non-text things such as an image file.
You can display images on hover, or in popups, or in dialogs, but not within the editor itself.
Do you want the image to show in the class' source code itself? As an aside, images in Javadocs will show when you view the formatted javadoc view the Quick documentation action (Windows/Linux: Ctrl+Q or Mac: ^J)
If you still want the image to show in the source code, then yes, you will need to write a plug-in. You can look at the Information for Plugin Developers
Setting Up the Plugin Development Environment section of this web page - https://www.jetbrains.com/idea/plugins - to get started. You'll have to dig through source code to try and find some ideas for how to display an image in the source code. As much as I love IntelliJ IDEA, there plug-in documentation is a bit weak. When I wrote a plug-in, I had to do a lot of looking through the IDEA code to find code that was doing things similar to what I wanted to do. I also downloaded the source code for some of the better plug-ins out there and looked through them.
Finally, you can ask for some guidance in the IntelliJ IDEA Open API and Plugin Development forum. That forum is monitored by JetBrains developers. Your best bet to getting answers in that forum is to ask very specific questions. Do not try and get someone to explain from start to finish what you need to do. As you do each step, ask questions about what you are trying to do.

What is the general approach to fixing Go To functionality in Resharper

I often see that some of the ReSharper functionality just doesn't work until you restart VS and reopen the project. But this situation I have now is consistent across restarts. So I am using a Go To Everything fuctionality often. It is enabled in ReSharper settings.
But since yesterday Go To Everything (Ctrl + N for me) can't find most of the files in the project (though it can find some).
Here is a screenshot of the problem:
I have that file open in editor just to prove that it's there. I show it found in an open solution in file tree. But ReSharper doesn't seem to be able to find it.
What to I do to troubleshoot. Thanks you in advance.
The best thing to do here is to raise an issue with JetBrains. Either log a bug with the issue tracker, or email resharper-support#jetbrains.com. Include details about what version of ReSharper you're using, what type of projects you're using, version of Visual Studio, etc.
However, from that screenshot, it looks like ReSharper isn't configured to analyse that file - there's no "green tick" in the scrollbar. Is ReSharper disabled? Is that file excluded from analysis? (Mind you, even when it's excluded, it should still show up in go to results. Something odd is happening here, support should be able to help better than StackOverflow)

Sublime text 3 log location

Title says it all. Searched around on SO before asking but couldn't find one that has specifically asked about the general error log file for sublime.
I know errors and events are output in the console but it appears the console refreshes on restart, so this doesn't help as in my situation ST3 hangs non-deterministically.
I don't believe that is exposed, at least not much in-depth. If you want that functionality, you may want to get the SublimeLog package.
However, even that package will clear out the logs on each start. Fortunately, the source code is available - so you could probably override this behavior fairly easily.
Sublime Text 2 and 3 provide a console (accessible via Control-`) for
interaction with their Python-based innards and plug-in architecture.
This plug-in logs the console contents into a plain-text file
ornamented with logger activation/deactivation timestamps.
The log is erased and recreated each time Sublime Text is launched.
Emphasis added

Non-blocking Dialog box in Applescript

I have to write a small script to deploy a patch for our Application. The patch
will replace a couple of files in the application.I decided to depploy the patch using Applescript. The files to be copied are quite large and it takes some time for the files to be copied. I wanted to know if there is any way I can get a dialog box which doesn't block the execution of the script so that I can display some message like Updating.. etc while the patch is applied and then close the dialog box after wards.
Thanks
Shivaprasad
There's a scripting addition called Akua Sweets (oldy but goody) that has a display progress command. Get it at osaxen.com. it's in the 'most popular' section at the top of the page.
edit
Oh, bugger, that's only for OS9. It was really useful back in the day, I remember using it a lot (of course everything took a lot longer in those days so progress bars were more in demand).
another edit
You got me inspired, there's a couple of scripts I use that need progress bars, so I went looking and found this scripting addition at http://osaxen.com/files/extrasuites1.1.html
and again
here's a basic tutorial for how to do it in interface builder. I think that's probably the right way to do it.
I myself ran into the same problem. Unfortunately applescript doesn't provide an easy way of implementing a progress bar.
I ended up using the stop loop example found here to build an application. This guy has a bunch of applescript studio xcode projects to download and mess around with. It's some really great sample code if you aren't too familiar with applescript studio.

Resources