How to make eclipse plugin view always appear on right with fixed size - eclipse-plugin

I am new to eclipse plugin development. With the given sample of "Plugin with a view", the view is creating successfully. But this view can be made to move at any corner and the size of it keeps on changing. How could i make it to appear always on right with a fixed width & height.

I think you'll need to use a Perspective for this, at least that is what I've done in my plugin.
Create a perspective implementing IPerspectiveFactory (extension point org.eclipse.ui.perspectiveExtensions) and you can design an initial layout defining where a view opens as well as its width/hight.
You can use this link as a rough guide.

Related

Rally HTML app always forces browser scroll bar - how to avoid this?

I've noticed that when I add an HTML app in Rally/Agile Central, the height doesn't fit/adjust within the browser windows. This means that a vertical scrollbar is always added.
I'm using Chrome and Firebox, but they both have this problem.
Is there a way to limit the height of the custom app?E.g., to (height - 25) so that the browser scroll bar is not necessary?
Can you share some of your code? It might help in diagnosing what's going on. A couple ideas though...
Are you using a layout for your app? This often can help with scrollbar issues.
This guide may be helpful for learning to work with layouts: https://docs.ca.com/ca-agile-central/saas/apps/2.1/doc/#!/guide/layouts
If you're just using auto layout (the default, if you didn't explicitly specify one) then you can also try adding autoScroll: false to your app's config. Note this may cause your content to be clipped if you do actually need a scrollbar though.
Here is an examle with the std list app - and it's the same whether there is anything to show or not.
I'm thinking that it is the HTML app that doesn't take into account that there is a page title, in this case "*test layout scroll bars" - and somehow uses the "full height" = the entire frame (I'm not an html/css expert)

Why is my window resizing itself? (Cocoa app)

I was creating a simple GUI for an app, and came across this seemingly unusual behaviour when running.
Here is what my xib file looks like:
And here is what happens when I run the app:
I have tried creating a new view and using that instead, but it displays the same behaviour.
Why is the window getting resized? And more importantly, how can you prevent it from happening?
Thanks!
I've had this problem lately with Xcode's auto-layout feature. I solved it by manually deleting all the constraints and using the "Editor->Resolve Auto-Layout Issues->Reset to Suggested Constraints in Window.
You either need to use Auto Layout Constraints or Springs and Struts (old style ) to configure your views. The window normally will adjust itself as needed with auto layout.
With old style you have to manage the window frame or at least its content view frame.
Go to .xib file
and select size inspector. and from that set autosizing according to your rquirement.
Feel free to contact.
Increase main window width and hight.

How to transition existing divs in yui3 to Overlay bodyContent

I've figured out how to create an Overlay, center it, and set it's bodyContent to be an existing from my page. So far so good - now I want to make the transition happen smoothly over 1 full second instead of instantaneously.
The examples I've seen indicate that one must know the initial and final positions, but in this case, I don't know them, since I'm just saying:
overlay.set('bodyContent', Y.one('#node'));
overlay.set('centered', true)
I've created a jsbin at http://jsbin.com/ovuxan/5/edit that shows the issue.. (my transition is whacky to say the least) and would appreciate some help in making it smoother.
You can use the WidgetAnim plugin to do this for you. It can be cleaner since the animations are stored in the plugin and invoked by the widget's hide/show functions.
I have quickly used the plugin to animate your overlay here: http://jsbin.com/ohafec/1/edit
Helpful links:
Overlay: Animation Plugin (YUI Blog)
Plugin.WidgetAnim Class

Xcode/iTunes/Instruments central toolbar item; what's it called and how do I create one?

I'd like to create a toolbar item like the central item seen in Xcode/iTune/Instruments/etc:
Can anyone tell me what it's called and how to go about creating my own?
Also, will I face problems getting my app approved by Apple when I submit it to the Mac App Store, for imitating Apple's own apps too much?
I finally implemented the solution from here:
iTunes or Xcode style information box at top of window
Here are the initial results:
This is an Apple's private control, but you cannot create it as a NSToolbarItem. Check this other Q/A to know how to add a custom view in the window's main frame.
Is it possible to draw in the label area of NSToolbar?
I've noticed some interesting things about Instruments:
If you make the window narrow such that the overflow menu is triggered, the items in that menu are all blank.
You can't change the icon size or turn labels on/off.
Colors does not have a label when you add it to the toolbar.
The labels on Space, Flexible Space, and Colors do not line up with the other items' labels.
These are interesting because they seem to fit an idea I had for implementing this: turn labels off, and give all your items custom views, where normal-looking items actually have manually drawn labels. It would obviously be a lot of work, but it gives you enough freedom to effectively do full-height items.
The nice thing is that, unlike the view/window hack that Xcode seems to use, you still have a customizable toolbar with draggable items.

How to display indeterminate NSProgressIndicator in the NSOutlineView?

I need to display a progress of loading of item's children. Please advise how to implement a progress indicator like it's done in Mail application:
(source: quicksnapper.com)
P. S. Here a source code of using indicator sub-views: http://snippets.dzone.com/posts/show/7684
This is harder than it should be, because Apple does not provide an NSProgressIndicatorCell. While table and outline views support the idea of custom cells being displayed within them, they are not set up to easily support custom subviews.
So the trick becomes, how do you get a a complete NSProgressIndicator view to display and animate at the desired spot in your window, without the ability to actually install it in the table view row?
The trick I've used is to literally install the NSProgressIndicator as a subview of the outline or table view itself. To find the location to add the subview, so it looks like it's "in the row", use the frameOfCellAtColumn:row: method. You can then position your progress indicator within that location of the outline view. When you're done spinning the progress indicator, you probably don't want to show it any more, so just remove it from its superview and discard it.
You will want to make sure you set the required autosizing flags on the progress indicator, so that it floats in the correct direction when/if your outline view is resized.
I'm sure there are other hacks like this to achieve the desired end result. I don't think there is any super-clean way to accomplish this trick.
Vienna is an open-source (Apache license) feed reader that has this in its source list. You should look at the Vienna source code to see how they did it.
Viena's implementation is not perfect. Add a feed to a folder then as it is loading and the progress indicator is busy collapse that folder. You will see the progress indicator still running in the same location.