Quick search ViewPart - eclipse-plugin

In my Eclipse plugin I'm displaying data in own view using TableViewer. I've added search functionality for this view via custom dialog being showed after pressing CTRL+F. To do it I've used key listener attached to TableViewer's Table. In Windows, search works fine but in Linux it is being overridden by other functionality: Eclipse displays a text field at the bottom of the active view and does incremental search.
I want my plugin to behave the same on both platforms (I haven't decided yet which approach will be more convenient).
how to enable / modify this functionality in Windows?
how to disable it in Linux?

Related

Is it possible to add custom keyboard shortcuts to a webapp which you don't own?

For example, suppose there's a webapp called todotasks.com that allows you to log in and add new tasks (in particular, by clicking a series of menu bottons, inputing text in a popup form, and pressing enter). Suppose this webapp doesn't have a keyboard shortcut for adding a new task, and forces you to do everything with a mouse. Would it be possible to add your own keyboard shortcut here that works locally to your machine?
NOTE: Here I'm referring to webapps which you are not the author of.

IntelliJ IDEA secondary windows lack a menu. How can i enable it?

I'm a frontend developer and I have a multi-monitor setup. I have HTML code on one monitor and CSS code on another monitor.
To achieve that, I drag a tab out of IntelliJ IDEA window, so that the tab opens in a separate window.
My problem is that the secondary window lacks a menu:
Menu access hot keys (e.g. Alt+V) won't work. I can't make use of the main window's menu either because when I click it, the focus switches to the active tab of the main window.
How do I access the menu when I'm working in IDEA's secondary window?
This feature is currently not available in IntelliJ IDEA.
The alternatives I could think of to do what you want:
Consider raising a feature request on http://youtrack.jetbrains.com/
Do you think it's possible that you might not miss the menu on the detached tab if instead of accessing functionality through the menu, you did the same through keyboard shortcuts?
Personally, being a keyboard junkie, I have not felt the lack of a menu on the detached tab.
Even though Eclipse allows you to create a new window for the same workspace, I had some issues with it ( for eg: if you set a breakpoint in a file in Window 1, and started a debug session from Window 2, then the file would be re-opened in Window 2 when the breakpoint is hit) and feel that the Intellij IDEA implementation works better.
(Warning! The most Hacky suggestion) Assuming you are using Windows, there are a number of ways in which you could extend the single IntelliJ window across the two monitors and then instead of detaching a tab, you could do a 'Split Vertically' in that single window. With the slider between the tabs positioned just right, it will seem you have two windows opened with each of them having a menu.
To extend a window across two monitors see : How can you maximize a window on to dual monitors in Windows 7 or use one of the multi-monitor tools listed here or here ( I vaguely recall that it was the latter 'zbar' that I used to extend a window during my eclipse days).
Believe it or not, I have done this with Eclipse when I was sick of guessing where the file-with-the-breakpoint would open up :)

Menu bar button panels in Cocoa?

When I click on buttons in the menu bar (such as "About Program") when the program is running a new window pops up displaying information. How do I edit the windows associated with the buttons?
In Interface builder I manage to load "Main Menu" which allows me to customize the menu bar, but it doesn't allow me to work with the windows associated with the buttons. How would I edit these windows?
Mac OSX Snow Leopard, Xcode 3.2.6
EDIT: I am not specifically asking for steps for the "About Panel". I am looking for a general procedure for editing panels associated with buttons in the menu bar. In addition to the "About" panel I would also want to work with panels such as the "Help" panel. The "About" panel was just an example.
The standard About panel isn't in your nib; it's generated within the framework.
You can change the text of the panel by writing a Credits.rtf or Credits.html file and including that in your app bundle. (You may already have Credits.rtf supplied by the project template. If so, you should just edit that.)
If you want to make more radical changes, you'll need to create your own panel and change your About menu item to show it instead.
As far as a general procedure...no, there's no single procedure that would let you customize any standard panel in the same way. They all have their own mechanisms (e.g. some can display more panes when plug-in components are installed; some provide APIs to hide or show certain parts; some, like the About box, use bundle filename conventions to decide what to do).
For the Help panel specifically...you can't change anything about it except the web page (i.e. the help content). The toolbar, etc. is all handled by Apple. I suggest looking at this documentation for more, which also links to other important documents:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/OnlineHelp/Concepts/ComprehenHelp.html%23//apple_ref/doc/uid/20000017-BBCCFHAC

Programmatically open detail section of progress dialog in Eclipse

In a progress dialog (IProgressMonitor), there is a Details button that expands the progress dialog to show the details section. How do I open the details section programmatically in my Eclipse plugin?
Thanks.
You don't.
The UI for progress reporting is absolutely not part of the progress API, instead only the concept of tasks, sub tasks and their running state is part of that API. So in another version of eclipse the progress might be shown by playing a sound instead of showing a dialog.
Even your assumption of having that dialog is wrong. When you activate the workspace preference "Always in background", then a user will not see that dialog at all.
And as a last thing: Even if you feel that your plugin is so important that it should behave different than other plugins in Eclipse (and therefore want to access that progress dialog somehow), your users will not feel the same. And they will be confused when installing your plugin together with other plugins because they don't behave the same, although being part of one installation.

How do I inspect and activate other application’s menu?

Is it possible to inspect the main application menu of some already running application and execute commands from this menu? For example retrieve the whole main menu hierarchy of Safari and execute the File → New Tab command (by its name, not using the keyboard shortcut). I’m interested in an Objective-C solution.
One way to do this is using the Cocoa Accessibility API
For example,
NSAccessibilityPickAction Selects the
object, such as a menu item
You could use Applescript This is not exactly calling the menus but for a well written program provides the same functionality and using a defined and discoverable API.
To send the events see Scripting Bridge