com.nokia.sdt.uidesigner.ui.actions.ShowPropertiesAction.java Source code

Java tutorial

Introduction

Here is the source code for com.nokia.sdt.uidesigner.ui.actions.ShowPropertiesAction.java

Source

/*
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/

package com.nokia.sdt.uidesigner.ui.actions;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IEditorPart;

import com.nokia.sdt.uidesigner.ui.UIDesignerPlugin;
import com.nokia.sdt.uidesigner.ui.utils.Strings;
import com.swtdesigner.ResourceManager;

/**
 * An action to show the properties view part.
 */
public class ShowPropertiesAction extends ShowViewPartAction {

    public final static String ID = "com.nokia.sdt.uidesigner.showProperties"; //$NON-NLS-1$
    public final static String PROPERTIES_VIEW = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$

    public ShowPropertiesAction(IEditorPart editor) {
        super(editor);
    }

    protected void init() {
        super.init();
        setId(ID);
        setText(Strings.getString("ShowPropertiesAction.label")); //$NON-NLS-1$
        Image image = ResourceManager.getPluginImage(UIDesignerPlugin.getDefault(), "icons/properties_16.png"); //$NON-NLS-1$
        setImageDescriptor(ImageDescriptor.createFromImage(image));
    }

    protected String getViewPartId() {
        return PROPERTIES_VIEW;
    }
}