change icon of file in project view tool window - intellij-idea

I'm developing a plugin that gives the ability to version control and other stuff, for viewing the files added to my vcs I need to show them with a different overlay icon. Using the api how to change file/folder icons?

You need to implement the com.intellij.ide.FileIconProvider interface and register your implementation using the <fileIconProvider> extension point.

Related

Customize and change the default UI of pdftron - reactNative

My question is does pdftron give react native developpers some alternatives to change the whole ui?
As an example, i want to create a bottomTab to control the annotations and other things.
is it possible to do it without touching the java and swift code ?
you can create your own custom UI and use the set tool API in the PDFTron library. This allows the developer to set what tool mode is currently being used. You can also hide existing toolbars by using the available api’s.
Please see https://github.com/PDFTron/pdftron-react-native/blob/master/API.md#settoolmode for more information.

IBM Worklight - how to rename an application and change its icon, splash image

We've used an existing example application to start a proof of concept with Worklight, we've made a lot of changes to the original code and we would like to change the application name and customize its icons and splash image. We've managed to make the aforementioned changes (Name, icons and splash) inside xCode, however this doesn't serve the future purpose of an automated build from Worklight to ipa.
Could you please let us know what steps are involved to:
How to rename an existing application in Worklight (changing only the application-descriptor.xml doesn't change the generated binaries though).
How to change icons and splash screens for app.
When you create a new application for a Worklight project, the application name is used throughout several files, so you will need to find all occurrences of the given application name and change them. These are:
main HTML filename
main CSS filename
main JavaScript filename
inside main HTML filename (references to the main CSS and JavaScript files, title)
Inside application-descriptor.xml (the elements: displayName, description, mainFile)
Note, the filenames should not matter to you. In the future they will, hopefully, always get a generic name (like index.html or main.css. ...).
The app icon title in the device is controlled by the displayName element in application-descriptor.xml.
As for the icons and splash images, you can simply place thme (regular icon, retina icon, splash image, retina splash image) with the appropriate filenames in the "nativeResources" folder (sits next to the "native" folder) and they will be copied during build time to the native project (which you will eventually open in Xcode).
You can find out the correct filenames inside the native >> Resources folder.
quote:
however this doesn't serve the future purpose of an automated build
from Worklight to ipa.
Worklight will, of course, never create an .ipa file for you... that's the role of Xcode.

Library or API for file browser view?

I would like to implement a file browser view in my application so users can open files using a side panel similar to the browsers in XCode, Text Wrangler and some other programs.
Before I go off implementing another one of those browsers from scratch, does anyone know if there are existing libraries or APIs that already does this?
Google doesn't turn up with much and most of the searches point me to NSOpenPanel which I believe doesn't do what I want.
Thanks in advance.
The Cocoa class that is used to display hierarchical lists is called NSOutlineView.
Outline views provide several configuration options to adjust the appearance.
The content can be provided by implementing a data source protocol or via Cocoa bindings.
Apple has some sample code online that should get you started (it's a file browser - so maybe you can use larger parts of that sample):
https://developer.apple.com/library/mac/#samplecode/SourceView/Introduction/Intro.html

How to open a document in other specific app - like Safari does it with iBooks when viewing a PDF - without using UIDocumentInteractionController?

If you view a PDF in Safari, it will show button in the toolbar that reads "Open in iBooks".
As far as I know there is the custom URL scheme "itms-books:" for iBooks and that allows passing a file path. iBooks then seems to be able to copy the file from the source app (from anywhere, or only from the personal documents folder?).
How does this work? The only way I'm aware of to share documents with other apps is via UIDocumentInteractionController, but that that is tied to the default popup.
Is there a way to transfer files using a custom URL scheme like iBooks does?
Or is this some hack only Apple is allowed to use (private API)?
Another way I could think of is to render the controller off screen, loop through it and touch the correct target app by code. Sounds dirty though....
Please note that my intention is not to open something in iBooks but in another app somebody else implemented (that app would be registered for the file types I offer and maybe have a custom URL scheme if required).

Add badge icon overlay to Finder icons and folders?

When we open Dropbox folder, we can see icon on the left bottom of the folder.
I am developing an application in which i also want the same behavior. If folder is syncing then it will show sync icon and for other operation it will show other icon. The marked files/folder when viewed in Finder must be shown with a custom icon. But when they are selected for preview ( using spacebar) they must show their original icon ( i.e the blue icon for folder etc) .
Starting with Yosemite (10.10), there is now an officially supported (and thus Mac App Store compatible) method for displaying sync status badges in Finder icons in the form of Finder Sync extensions.
Dropbox has developed a NSPlugin for showing icon badges on each folder/file. As you would know, NSPlugins for Finder were deprecated by Apple starting with Snow Leopard. I think Dropbox worked around it with a hack - that reenabled plugin support. I don't think Apple would have liked that. Apple wants third party apps to only provide services support, since they don't want any third party code in Finder's process, but services are underwhelming.
In addition to the Finder Sync Extension mentioned in other answers, badges (and other metadata) on files can additionally be accomplished via the File Provider API:
File Provider
An extension other apps use to access files and folders managed by your app and synced with a remote storage.
https://developer.apple.com/documentation/fileprovider
Specifically, the NSFileProviderItemDecorating class:
Badge
The system displays the badge image on top of the item’s icon. It only displays the first Badge image.
FolderBadge
Only available on folder items. The system embosses the image over the folder icon. It only displays the first FolderBadge image.
This can be achieved by creating new Finder Sync Extension. Find more information here: https://stackoverflow.com/a/43183393