view com.redhat.thermostat.tools.eclipse.plugin/src/com/redhat/thermostat/tools/eclipse/plugin/editor/CommandsPage.java @ 97:1c835942f3c2

Add descriptions to Command and Extensions pages
author Omair Majid <omajid@redhat.com>
date Thu, 06 Feb 2014 17:03:49 -0500
parents 8f2dd0dbdb87
children
line wrap: on
line source

package com.redhat.thermostat.tools.eclipse.plugin.editor;

import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.TableWrapLayout;

import com.redhat.thermostat.tools.eclipse.plugin.Messages;
import com.redhat.thermostat.tools.eclipse.plugin.model.Plugin;

/**
 * The "Commands" tab.
 */
public class CommandsPage extends FormPage {

    static final String ID = "com.redhat.thermostat.tools.eclipse.plugin.editor.CommandsPage"; //$NON-NLS-1$
    static final String TITLE = Messages.CommandsPage_title;


    private Plugin model;

    public CommandsPage(FormEditor editor, Plugin model) {
        super(editor, ID, TITLE);

        this.model = model;
    }

    @Override
    protected void createFormContent(IManagedForm managedForm) {
        ScrolledForm form = managedForm.getForm();

        form.setText(Messages.CommandsPage_title);
        form.getBody().setLayout(new TableWrapLayout());

        CommandsMasterDetailsBlock masterAndDetails = new CommandsMasterDetailsBlock(this);
        masterAndDetails.setModel(model);
        masterAndDetails.createContent(managedForm);
    }

}