Search in sources :

Example 1 with AutoCorrectAction

use of com.liferay.ide.project.ui.migration.AutoCorrectAction in project liferay-ide by liferay.

the class FindBreakingChangesPage method createTableView.

public void createTableView(Composite container) {
    GridData gridData = new GridData(GridData.FILL_BOTH);
    gridData.minimumWidth = 200;
    gridData.minimumHeight = 200;
    Composite tableComposite = new Composite(container, SWT.NONE);
    _problemsViewer = new TableViewer(tableComposite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER | SWT.VIRTUAL);
    _problemsViewer.getTable().setLayoutData(gridData);
    _createColumns(_problemsViewer);
    final Table table = _problemsViewer.getTable();
    table.setHeaderVisible(true);
    _problemsViewer.setContentProvider(ArrayContentProvider.getInstance());
    _problemsViewer.setComparer(null);
    _comparator = new MigratorComparator();
    _problemsViewer.setComparator(_comparator);
    MenuManager menuMgr = new MenuManager();
    IAction markDoneAction = new MarkDoneAction(_problemsViewer);
    IAction markUndoneAction = new MarkUndoneAction(_problemsViewer);
    IAction ignoreAction = new IgnoreAction(_problemsViewer);
    IAction ignoreAlways = new IgnoreAlwaysAction(_problemsViewer);
    IAction autoCorrectAction = new AutoCorrectAction(_problemsViewer);
    menuMgr.add(markDoneAction);
    menuMgr.add(markUndoneAction);
    menuMgr.add(ignoreAction);
    menuMgr.add(autoCorrectAction);
    menuMgr.add(ignoreAlways);
    Menu menu = menuMgr.createContextMenu(table);
    table.setMenu(menu);
    _problemsViewer.addDoubleClickListener(this);
}
Also used : MigratorComparator(com.liferay.ide.project.ui.migration.MigratorComparator) Table(org.eclipse.swt.widgets.Table) MarkDoneAction(com.liferay.ide.project.ui.migration.MarkDoneAction) Composite(org.eclipse.swt.widgets.Composite) IAction(org.eclipse.jface.action.IAction) AutoCorrectAction(com.liferay.ide.project.ui.migration.AutoCorrectAction) MarkUndoneAction(com.liferay.ide.project.ui.migration.MarkUndoneAction) GridData(org.eclipse.swt.layout.GridData) MenuManager(org.eclipse.jface.action.MenuManager) IgnoreAlwaysAction(com.liferay.ide.project.ui.migration.IgnoreAlwaysAction) Menu(org.eclipse.swt.widgets.Menu) TableViewer(org.eclipse.jface.viewers.TableViewer) IgnoreAction(com.liferay.ide.project.ui.migration.IgnoreAction)

Aggregations

AutoCorrectAction (com.liferay.ide.project.ui.migration.AutoCorrectAction)1 IgnoreAction (com.liferay.ide.project.ui.migration.IgnoreAction)1 IgnoreAlwaysAction (com.liferay.ide.project.ui.migration.IgnoreAlwaysAction)1 MarkDoneAction (com.liferay.ide.project.ui.migration.MarkDoneAction)1 MarkUndoneAction (com.liferay.ide.project.ui.migration.MarkUndoneAction)1 MigratorComparator (com.liferay.ide.project.ui.migration.MigratorComparator)1 IAction (org.eclipse.jface.action.IAction)1 MenuManager (org.eclipse.jface.action.MenuManager)1 TableViewer (org.eclipse.jface.viewers.TableViewer)1 GridData (org.eclipse.swt.layout.GridData)1 Composite (org.eclipse.swt.widgets.Composite)1 Menu (org.eclipse.swt.widgets.Menu)1 Table (org.eclipse.swt.widgets.Table)1