Showing posts with label jface. Show all posts
Showing posts with label jface. Show all posts

Tuesday, 20 November 2012

Interesting incidents during internship

In this post Ill share some of the intresting things which happened with me during my internship.
Ill start with the first day I entered into the premises of the BMC Software, Pune. I was staying with Mr Amit as until than I had no room. I came with him to the company riding on his motor bike. Pune is a big city but the system of public transport is absolutely a mess. If you want to travel a distance of 4-5 km on public buses do not expect to reach there in less than an hour. So almost every one except students who can afford their own vehicle everyone travels on his own vehicle. Most of the people driving have no traffic sense either so you have to be extra careful while driving. 
Sorry I was supposed to talk about my day in the company. Right?
Well we reached there its an nine floor plush building and to be honest I had never been into a software industry before. We walked to the reception, Mr Amit arranged a visitors pass for me and took me to the eight floor. I waited for him to arrange me a meeting with Manager in the cafeteria. The cafeteria is just cool. There are cafe coffee days coffee vending machines, Pepsi, other drinks, snacks available for free. Also for the guest.
I waited there until Mr Amit returned and took me to meet the manager. He made me sign the internship deal with terms and condition in there and asked me to read it carefully as its always asked but nobody cares  to read it. I too signed it without bother what it read.

Thursday, 9 August 2012

刷新内容提供商FilteredItemsSelectionDialog

我写了一个对话框延长过滤项目日食选择对话框这个对话框有几个复选框int的视图菜单我想显示的内容在视图菜单指明的条件

当我真正开始什么我没有一个线索如何做到这一点

像任何其他崇拜者编码我问,如果他能帮助做什么我想完全惊讶议员谷歌老兄我是不是线索

怎么过,最终找出感谢同事现在我已经决定会让全世界都知道如何做到这一点所以下一次有人问谷歌先生,他确实有一个正确的答案

首先你有延长ViewerFilter类,MyViewerFilter及以上乘坐方法的选择()以满足我们需要

第二行动呼叫addListFilter过滤器)run()方法;过滤器是一个调用scheduleRefresh()typeMyViewerFilter对象;

这样做更新内容提供商点击复选框

Thursday, 26 July 2012

Bragging

In this Post I ll brag about the the first question I answered on StackOverFlow.com. The best part is that my answer got accepted too.  Well The question was as follows:

I have been following the tutorial here. In the advanced tutorial ResourceSelectionHistory stores the selected items and the retrieves it when the dialog is relaunched. I wanted the ResourceSelectionHistory to store objects and not just strings, is there i way to do that. I also want the items to open in the editor when the user clicks on them. When I click on an item in the actual populated list it opens, but not when I click on the part showing history.

The person here wants to IMemento to tell him what type of object was stored in the History. As the person who first answered the question said that these classes are very restrictive. and they expect you to do only what they want you do do.

I have figured out a way that could be used to do what the questioner want: Follow along.....

You can store strings, integers and Boolean to IMemento. You can cleverly utilize them to reveal the type of object. For example you can use element.putInteger("objType", 1); if your object is of say type A and element.putInteger("objType", 2); if its of type B. Hope that helps.

ge33ek

Wednesday, 25 July 2012

Refreshing content provider of FilteredItemsSelectionDialog

I have written a dialog extending filtered items selection dialog of eclipse. This dialog has few check boxes int the view menu. I wanted to display the content depending on the condition specified in the view menu.
When I actually started doing what I wanted I didn't have a clue how to do it.
Like any other wannabe coder I asked Mr Google if he could help me in doing what I wanted, and to my utter astonishment Mr Google said: Dude  I ain't gotta clue either.
How ever I did ultimately figure it out thanks to a colleague.  I have decided now that i ll let the world know how to do it, so that the next time somebody asks Mr Google, he does have a proper answer.

First of all you have to extend the ViewerFilter class, call it MyViewerFilter and over ride the method select() to suit our need.

Second: In the run() method of action call addListFilter(filter); where filter is an object of the typeMyViewerFilter than call scheduleRefresh();



Doing That will update the content provider with every click on the check box.