How to programmatically change help contents in Eclipse? - eclipse

I have an eclipse plugin and I would like to programmatically disable help content TOC's based on a variable I define. In a nut shell, I want to prevent some help docs from showing up in the help contents if a specific type of user is accessing the plugin.
Preferably I would like to do this in the ApplicationWorkbenchAdvisor somewhere.
One thought would be to modify the "primary" value to be false if the variable were set.

Not sure if it would work, but try using the org.eclipse.ui.activities extension point. The tutorial from Vogella tells it is possible to hide only UI elements like wizards, views and so on, but it is from 2009.. Not sure if hiding TOC is now possible. If you try it out, would be nice to give a feedback ;)

Related

Launchpad has a different style to the views

i have a question.
Why is the style of the view a different one in the launchpad as without ?
Its kinda annoying because some of the labels or inputs sometimes gets readjust and than it is not clean. The ui looks way smaller, can it be fixed? I tryed already to put "fullWidth": true in the manifest but yeah no changes.. when i open the dev menu and delete the sapUiSizeCompact from the body in the launchpad then it looks normal. But i did never set the sapUiSizeCompact is there a way to remove it?
Example:
Not launchpad
In the Launchpad
i found a way but it seems you have to set it per user.. i am not really happy but maybe someone know how to do it as a standard so the user dont have to set it by deafult. You can set this option in the settings of the flp

ICEFaces: values for the "icon" attribute

I'm writing a menu bar made up of icons.
The easiest way, in my opinion, is relying on the icon attribute of the ace:menuItem component.
Unfortunately, I couldn't find, neither in the showcase nor in the documentation, a complete list of the built-in values allowed for that attribute (i.e. ui-icon, ui-icon-contact etc.).
Where could I find it? In case there isn't such a list, how could I work it out?
You can check the source of the page, then open theme.css
Have a look at:
http://jquery-ui.googlecode.com/svn/tags/1.6rc5/tests/static/icons.html

Faking a GTK_RESPONSE_OK in a GTK dialog

I want to have a gtk_file_chooser_dialog that does not browse into a folder if it has a specific name. For this I hooked up my dialog with a callback when a current-folder-changed signal is emitted. In the callback function I successfully detect if the selected folder has the specific name. However, I can't figure out how to tell the dialog to close itself and return a specific response code (e.g. GTK_RESPONSE_OK).
I have unsuccessfully tried (among other things):
g_signal_emit_by_name(G_OBJECT(my_dialog), "response", GTK_RESPONSE_OK);
Has anyone a better idea ? I would appreciate any pointers into the right direction..
cheers
You're trying too hard. Just use:
gtk_dialog_response(GTK_DIALOG(my_dialog), GTK_RESPONSE_OK);
See the splendid documentation.

avoid chrome popup extension to close

Is there a function that allow me to select text when the extension
stays open. Normally when I Use the extension popup and I Click outside the
extension the extension close. Is there a wat to avoid this.
Thank you so much
Unfortunately there is currently no way to keep the popup open once you focus out of it. This is by design.
If you would like to always show something while interacting with the page, perhaps the experimental Info bars or even Desktop Notifications would work?
Hope that helped!
The only way to keep it open is to right click over the extension icon (button) and select "Inspect popup" the extension popup then show up and remain open but of course the debugger window show and this not a fix obviously still it will maybe inspire a hack... if someone is skilled enough and share the solution with all of us.
I encountered the same problem and I've thought of a possible solution (though not tested it):
Use your background.html to store the content of the popup action and upon loading the popup, you fetch the content via the default messaging for chrome extensions.
When doing all kinds of other stuff, like XHR's or something, I think you should do that in background.html too, so the requests won't abort if you close and you can do something with the result. Then when a user re-opens the popup, he'll see the result of his previous action instead of the default screen.
Anyone tried something like did already?
As far as I know you can't persist a pop up menu but my workaround has been using a content script to append a menu on page load. After the menu is appended you can toggle the menu via messaging between the background script and the content script.
If you want to encapsulate the menu from the page it's deployed on you could wrap your menu in an iframe. This could add complexity to your project since you would have to deal with cross origin issues and permissions.
There is an alternative hack for this. You can make use of chrome local storage to store the metadata as needed. Upon restart you can read that metadata and render the desired content. You will also probably clear that metadata after you have completed performing the operations based on that.

How to Create the Highlight/Note Popup Buttons from the iPhone Kindle

I am wondering how Amazon did the highlight/note popup buttons in the Kindle app. After reading about UIPasteboard, UIMenuController, UIResponder, and UIResponderStandardEditActions, I am able to turn on or off standard edit actions (i.e. copy, cut, paste, select, and selectAll). However I haven't found a way to add a custom action yet. I would really appreciate it if I could get a pointer.
Thanks in advance!
Chris
(source: sampletheweb.com)
Edited by balexandre (added image instead link)
It looks like Amazon implemented their own custom view that mimicked the appearance of UIMenuController. I believe they did this rather than use SPI because if you click and hold on the Highlight cell, the arrow does not highlight, when it does in the real UIMenuController.
I don’t think there is a public interface to these controls, you’d probably have to code them yourself. (Or maybe figure out the private API, but that’s a slippery slope.) I am not sure about that, though, maybe somebody will prove me wrong.
That's a good point about the arrow part of the Notes/Highlight popup menu not highlighting, so they must be implementing their own.
However they are also obviously using a UIWebView, because it's recognizing tap and hold and they can highlight the text, and you can't get touch events from a UIWebView, much less get the information about what's selected. So how are they doing that?
This would be very useful for us to be able to do as well.
Use DTMenuController http://www.drobnik.com/touch/2010/01/dr-touchs-parts-store/
Costs 100 EUR ^_^
Custom menu items can be added via the UIMenuController's menuItems property. See Apple's UIMenuController docs.
the javascript part can be managed with jQuery, that's a fair simple and powerful library. i'm using it for resizing and rearranging things in a webview and it works great :)