Search in sources :

Example 21 with PluginPackageModel

use of com.liferay.ide.portlet.core.PluginPackageModel in project liferay-ide by liferay.

the class RequiredDeploymentContextsSection method swap.

public void swap(int index1, int index2) {
    TableViewer viewer = getTablePart().getTableViewer();
    Table table = viewer.getTable();
    String dep1 = (String) table.getItem(index1).getData();
    String dep2 = (String) table.getItem(index2).getData();
    PluginPackageModel model = (PluginPackageModel) getPage().getModel();
    model.swapDependencies(PluginPackageModel.PROPERTY_REQUIRED_DEPLOYMENT_CONTEXTS, dep1, dep2);
}
Also used : Table(org.eclipse.swt.widgets.Table) PluginPackageModel(com.liferay.ide.portlet.core.PluginPackageModel) IPluginPackageModel(com.liferay.ide.portlet.core.IPluginPackageModel) TableViewer(org.eclipse.jface.viewers.TableViewer)

Aggregations

PluginPackageModel (com.liferay.ide.portlet.core.PluginPackageModel)21 IPluginPackageModel (com.liferay.ide.portlet.core.IPluginPackageModel)17 File (java.io.File)6 IPath (org.eclipse.core.runtime.IPath)6 Iterator (java.util.Iterator)4 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)4 ExternalFileSelectionDialog (com.liferay.ide.ui.wizard.ExternalFileSelectionDialog)3 IProject (org.eclipse.core.resources.IProject)3 IDocument (org.eclipse.jface.text.IDocument)3 SDK (com.liferay.ide.sdk.core.SDK)2 IFolder (org.eclipse.core.resources.IFolder)2 TableViewer (org.eclipse.jface.viewers.TableViewer)2 Shell (org.eclipse.swt.widgets.Shell)2 LiferayProjectSelectionDialog (com.liferay.ide.project.ui.dialog.LiferayProjectSelectionDialog)1 IDEFormEditor (com.liferay.ide.ui.form.IDEFormEditor)1 TablePart (com.liferay.ide.ui.form.TablePart)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IFile (org.eclipse.core.resources.IFile)1 CoreException (org.eclipse.core.runtime.CoreException)1 IJavaProject (org.eclipse.jdt.core.IJavaProject)1