Search in sources :

Example 1 with StringArrayTableWizardSectionCallback

use of com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback in project liferay-ide by liferay.

the class NewCustomJSPsHookWizardPage method createCustomJSPsGroup.

protected void createCustomJSPsGroup(Composite parent) {
    Composite composite = SWTUtil.createTopComposite(parent, 2);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
    jspItemsSection = new CustomJSPsTableWizardSection(composite, Msgs.jspFilesOverride, Msgs.jspFilePath, Msgs.add, Msgs.edit, Msgs.remove, new String[] { Msgs.add }, new String[] { Msgs.jspFilePath }, null, getDataModel(), CUSTOM_JSPS_ITEMS);
    GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1);
    gd.heightHint = 175;
    jspItemsSection.setLayoutData(gd);
    jspItemsSection.setCallback(new StringArrayTableWizardSectionCallback());
    IProject project = CoreUtil.getProject(getDataModel().getStringProperty(PROJECT_NAME));
    ILiferayProject liferayProject = LiferayCore.create(project);
    if (liferayProject != null) {
        ILiferayPortal portal = liferayProject.adapt(ILiferayPortal.class);
        if (portal != null) {
            IPath portalDir = portal.getAppServerPortalDir();
            if (FileUtil.exists(portalDir)) {
                jspItemsSection.setPortalDir(portalDir.toFile());
            }
        }
    }
}
Also used : StringArrayTableWizardSectionCallback(com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback) Composite(org.eclipse.swt.widgets.Composite) IPath(org.eclipse.core.runtime.IPath) ILiferayProject(com.liferay.ide.core.ILiferayProject) GridData(org.eclipse.swt.layout.GridData) ILiferayPortal(com.liferay.ide.core.ILiferayPortal) IProject(org.eclipse.core.resources.IProject)

Example 2 with StringArrayTableWizardSectionCallback

use of com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback in project liferay-ide by liferay.

the class NewLanguagePropertiesHookWizardPage method createLanguagePropertiesGroup.

protected void createLanguagePropertiesGroup(Composite parent) {
    Composite composite = SWTUtil.createTopComposite(parent, 2);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
    languagePropertiesSection = new StringArrayTableWizardSection(composite, Msgs.languagePropertyFiles, Msgs.languagePropertyFileTitle, Msgs.add, Msgs.edit, Msgs.remove, new String[] { Msgs.add }, new String[] { Msgs.languagePropertyFileLabel }, null, getDataModel(), LANGUAGE_PROPERTIES_ITEMS);
    GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1);
    gd.heightHint = 175;
    languagePropertiesSection.setLayoutData(gd);
    languagePropertiesSection.setCallback(new StringArrayTableWizardSectionCallback());
}
Also used : StringArrayTableWizardSectionCallback(com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) StringArrayTableWizardSection(com.liferay.ide.project.ui.wizard.StringArrayTableWizardSection)

Example 3 with StringArrayTableWizardSectionCallback

use of com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback in project liferay-ide by liferay.

the class NewPortalPropertiesHookWizardPage method createPropertiesOverridesGroup.

protected void createPropertiesOverridesGroup(Composite topComposite) {
    Composite composite = SWTUtil.createTopComposite(topComposite, 2);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
    String[] titles = { Msgs.propertyTitle, Msgs.valueTitle };
    String[] labels = { Msgs.propertyLabel, Msgs.valueLabel };
    propertyOverridesSection = new PropertyOverridesTableWizardSection(composite, Msgs.specifyProperties, Msgs.addPropertyOverride, Msgs.add, Msgs.edit, Msgs.remove, titles, labels, null, getDataModel(), PORTAL_PROPERTIES_OVERRIDE_ITEMS);
    GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1);
    gd.heightHint = 150;
    propertyOverridesSection.setLayoutData(gd);
    propertyOverridesSection.setCallback(new StringArrayTableWizardSectionCallback());
    IProject project = CoreUtil.getProject(getDataModel().getStringProperty(PROJECT_NAME));
    if (project != null) {
        propertyOverridesSection.setProject(project);
    }
}
Also used : StringArrayTableWizardSectionCallback(com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) IProject(org.eclipse.core.resources.IProject)

Example 4 with StringArrayTableWizardSectionCallback

use of com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback in project liferay-ide by liferay.

the class NewPortalPropertiesHookWizardPage method createEventActionsGroup.

protected void createEventActionsGroup(Composite topComposite) {
    Composite composite = SWTUtil.createTopComposite(topComposite, 2);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
    String[] titles = { Msgs.eventTitle, Msgs.classTitle };
    String[] labels = { Msgs.eventLabel, Msgs.classLabel };
    eventActionsSection = new EventActionsTableWizardSection(composite, Msgs.defineActions, Msgs.addEventAction, Msgs.add, Msgs.edit, Msgs.remove, titles, labels, null, getDataModel(), PORTAL_PROPERTIES_ACTION_ITEMS);
    GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1);
    gd.heightHint = 150;
    eventActionsSection.setLayoutData(gd);
    eventActionsSection.setCallback(new StringArrayTableWizardSectionCallback());
    IProject project = CoreUtil.getProject(getDataModel().getStringProperty(PROJECT_NAME));
    if (project != null) {
        eventActionsSection.setProject(project);
    }
}
Also used : StringArrayTableWizardSectionCallback(com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) IProject(org.eclipse.core.resources.IProject)

Example 5 with StringArrayTableWizardSectionCallback

use of com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback in project liferay-ide by liferay.

the class NewServicesHookWizardPage method createServicesFileGroup.

protected void createServicesFileGroup(Composite topComposite) {
    Composite composite = SWTUtil.createTopComposite(topComposite, 2);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
    String[] titles = { Msgs.serviceTypeTitle, Msgs.implClassTitle };
    String[] labels = { Msgs.serviceTypeLabel, Msgs.impleClassLabel };
    servicesSection = new ServicesTableWizardSection(composite, Msgs.definePortalServices, Msgs.addServiceWrapper, Msgs.add, Msgs.edit, Msgs.remove, titles, labels, null, getDataModel(), SERVICES_ITEMS);
    GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1);
    gd.heightHint = 150;
    servicesSection.setLayoutData(gd);
    servicesSection.setCallback(new StringArrayTableWizardSectionCallback());
    IProject project = CoreUtil.getProject(getDataModel().getStringProperty(PROJECT_NAME));
    if (project != null) {
        servicesSection.setProject(project);
    }
}
Also used : StringArrayTableWizardSectionCallback(com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) IProject(org.eclipse.core.resources.IProject)

Aggregations

StringArrayTableWizardSectionCallback (com.liferay.ide.project.ui.wizard.StringArrayTableWizardSectionCallback)5 GridData (org.eclipse.swt.layout.GridData)5 Composite (org.eclipse.swt.widgets.Composite)5 IProject (org.eclipse.core.resources.IProject)4 ILiferayPortal (com.liferay.ide.core.ILiferayPortal)1 ILiferayProject (com.liferay.ide.core.ILiferayProject)1 StringArrayTableWizardSection (com.liferay.ide.project.ui.wizard.StringArrayTableWizardSection)1 IPath (org.eclipse.core.runtime.IPath)1