Search in sources :

Example 1 with IDEFormEditor

use of com.liferay.ide.ui.form.IDEFormEditor in project liferay-ide by liferay.

the class PortalDeployExcludesSection method selectionChanged.

protected void selectionChanged(IStructuredSelection sel) {
    IDEFormEditor editor = getPage().getFormEditor();
    editor.setSelection(sel);
    _updateButtons();
}
Also used : IDEFormEditor(com.liferay.ide.ui.form.IDEFormEditor)

Example 2 with IDEFormEditor

use of com.liferay.ide.ui.form.IDEFormEditor in project liferay-ide by liferay.

the class PortalJarsSection method selectionChanged.

protected void selectionChanged(IStructuredSelection sel) {
    IDEFormEditor editor = getPage().getFormEditor();
    editor.setSelection(sel);
    _updateButtons();
}
Also used : IDEFormEditor(com.liferay.ide.ui.form.IDEFormEditor)

Example 3 with IDEFormEditor

use of com.liferay.ide.ui.form.IDEFormEditor in project liferay-ide by liferay.

the class PortalTldsSection method selectionChanged.

protected void selectionChanged(IStructuredSelection sel) {
    IDEFormEditor formEditor = getPage().getFormEditor();
    formEditor.setSelection(sel);
    _updateButtons();
}
Also used : IDEFormEditor(com.liferay.ide.ui.form.IDEFormEditor)

Example 4 with IDEFormEditor

use of com.liferay.ide.ui.form.IDEFormEditor in project liferay-ide by liferay.

the class RequiredDeploymentContextsSection method selectionChanged.

protected void selectionChanged(IStructuredSelection sel) {
    IDEFormEditor formEditor = getPage().getFormEditor();
    formEditor.setSelection(sel);
    _updateButtons();
}
Also used : IDEFormEditor(com.liferay.ide.ui.form.IDEFormEditor)

Example 5 with IDEFormEditor

use of com.liferay.ide.ui.form.IDEFormEditor in project liferay-ide by liferay.

the class RequiredDeploymentContextsSection method _handleAdd.

private void _handleAdd() {
    PluginPackageModel model = (PluginPackageModel) getPage().getModel();
    String[] existingServiceDeps = model.getRequiredDeploymentContexts();
    ViewerFilter filter = new ViewerFilter() {

        @Override
        public boolean select(Viewer viewer, Object parentElement, Object element) {
            if (element instanceof IJavaProject) {
                IProject project = ((IJavaProject) element).getProject();
                for (String existingDep : existingServiceDeps) {
                    if (project.getName().equals(existingDep)) {
                        return false;
                    }
                }
                IDEFormEditor formEditor = getPage().getLiferayFormEditor();
                if (project.equals(formEditor.getCommonProject())) {
                    return false;
                }
                return true;
            } else {
                return false;
            }
        }
    };
    LiferayProjectSelectionDialog dialog = new LiferayProjectSelectionDialog(getPage().getShell(), filter);
    dialog.create();
    if (dialog.open() == Window.OK) {
        Object[] selectedProjects = dialog.getResult();
        try {
            for (int i = 0; i < selectedProjects.length; i++) {
                IJavaProject project = (IJavaProject) selectedProjects[i];
                if (project.exists()) {
                    model.addRequiredDeploymentContext(project.getProject().getName());
                }
            }
        } catch (Exception e) {
        }
    }
}
Also used : ViewerFilter(org.eclipse.jface.viewers.ViewerFilter) TableViewer(org.eclipse.jface.viewers.TableViewer) Viewer(org.eclipse.jface.viewers.Viewer) IDEFormEditor(com.liferay.ide.ui.form.IDEFormEditor) IProject(org.eclipse.core.resources.IProject) IJavaProject(org.eclipse.jdt.core.IJavaProject) LiferayProjectSelectionDialog(com.liferay.ide.project.ui.dialog.LiferayProjectSelectionDialog) PluginPackageModel(com.liferay.ide.portlet.core.PluginPackageModel) IPluginPackageModel(com.liferay.ide.portlet.core.IPluginPackageModel)

Aggregations

IDEFormEditor (com.liferay.ide.ui.form.IDEFormEditor)6 IPluginPackageModel (com.liferay.ide.portlet.core.IPluginPackageModel)1 PluginPackageModel (com.liferay.ide.portlet.core.PluginPackageModel)1 LiferayProjectSelectionDialog (com.liferay.ide.project.ui.dialog.LiferayProjectSelectionDialog)1 IFile (org.eclipse.core.resources.IFile)1 IProject (org.eclipse.core.resources.IProject)1 IPath (org.eclipse.core.runtime.IPath)1 IJavaProject (org.eclipse.jdt.core.IJavaProject)1 TableViewer (org.eclipse.jface.viewers.TableViewer)1 Viewer (org.eclipse.jface.viewers.Viewer)1 ViewerFilter (org.eclipse.jface.viewers.ViewerFilter)1 Shell (org.eclipse.swt.widgets.Shell)1 IFileEditorInput (org.eclipse.ui.IFileEditorInput)1 SaveAsDialog (org.eclipse.ui.dialogs.SaveAsDialog)1