Yeni adresim http://doganberktas.com

14 Haziran 2009 Pazar

Adding a view to an Eclipse RCP Project

1. Create an Eclipse RCP project named as AddingView (see how to do that)
2. Make sure when you run the program you see this output.

3. Open plugin.xml
4. Go to "Extensions" tab.
5. Select the org.eclipse.ui.views item, right click, select view to add a new view



6. In the Extension Element Details section on the right, you should see the class as addingview.ViewPart2. Click the class link.

7. See the pop-up. It will create a view class file for you.


8. When the class file is create make sure you add the ID field.
The value of the ID field should be same with the ID of the view in plugin.xml
public static String ID = "AddingView.view2";

9. Add a label to the view so that you can be sure about the opened view
Change the createPartControl method as follows

@Override
public void createPartControl(Composite parent)
{
Label otherViewLabel = new Label(parent, SWT.NONE);
otherViewLabel.setText("Other view");
}

10. Finally, add your view to the perspective. Open the perspective file and change the createInitialLayout method as follows"

public void createInitialLayout(IPageLayout layout)
{
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.setFixed(true);

layout.addStandaloneView(ViewPart2.ID, false, IPageLayout.LEFT, 1.0f, editorArea);
}

--

You can get the source code from here.

08 Haziran 2009 Pazartesi

Parsing Json with Obj-C -- json-framework

This is a summary of links for json parsing with obj-c  iPhone development. It just contains the sources I go through to fix my problem with parsing of a json feed.

This link explain to setup of the json framework
This one illustrate the basic capabilities of the framework
The links above supply all the necessary information for the basic json feed retrieval and parsing. The json framework's web site is here.

That's all for now.

23 Mayıs 2009 Cumartesi

8.04 to 9.04 -- Thank you Ubuntu Team

I have tried the built-in update mechanism before to upgrade my Ubuntu version. Unfortunately, it was just a nightmare that cause loss of some pictures, songs, etc.

But this time they did it right!
It works perfectly and now I am a Jaunty Jackalope user.

03 Mayıs 2009 Pazar

Standart (ucretsiz) uyelere onemli duyuru

Internet uzerinde uyeligim olan siteler icerinde benden para alabilen oldugunu hatirlamiyorum, zaten internet ustunden saglanan hizmetlerde, hizmete karsilik para istemek de bence tutacak bir formul degil gibi. 

Neyse efendim... 

Ara sira girip kurcaladigim sitelerden biridir doktorsitesi (hem saglik konularinda hassas olmamdan hem de ailede doktor olmasindan). Genel olarak ilgi cekme safhasinda sorun yasanmiyor, cunku oyle ya da boyle insanin kafasinda saglik ile ilgili sorular oluyor. Dolayisi ile cok anlamli bir alanda faaaliyet gosteriyorlar. Fakat, son attiklari mail bizim buralarda daha tam internet ustunden icerik saglama konularina alisamadigimizi gosteriyor. Bir internet sitesi nasil olurda kullanililarini (beni yani) ucretsiz olarak siniflar, birde bunu gonderdigi maillerde koca koca yazar.




17 Nisan 2009 Cuma

Placing Views into the same Folder -- Eclipse RCP


To place views in a subsequent manner as in the figure above follow the steps below:

  • Open the perspective file

  • Add a folder

    IFolderLayout folderUst = layout.createFolder("folderUst", IPageLayout.RIGHT, 1.0f, editorArea);

  • Add views to the folder for the view to be place side-by-side

    folderUst.addPlaceholder(View1.ID);
    folderUst.addPlaceholder(View2.ID);

  • Note: If you want to the views to be visible at the opening of the system, add the views to the folder in the perspective again in the perspective file, but dont forget to add them before adding their placeholer

    folderUst.addPlaceholder(View1.ID);
    folderUst.addPlaceholder(View2.ID);


    Final perpective code:

    package blogproject;
    import org.eclipse.ui.IFolderLayout;
    import org.eclipse.ui.IPageLayout;
    import org.eclipse.ui.IPerspectiveFactory;

    public class Perspective implements IPerspectiveFactory
    {
    public void createInitialLayout(IPageLayout layout)
    {
    String editorArea = layout.getEditorArea();
    layout.setEditorAreaVisible(false);
    layout.setFixed(true);

    IFolderLayout folderUst = layout.createFolder("folderUst", IPageLayout.RIGHT, 1.0f, editorArea);

    folderUst.addView(View1.ID);
    folderUst.addView(View2.ID);

    folderUst.addPlaceholder(View1.ID);
    folderUst.addPlaceholder(View2.ID);
    }
    }

  •