Search in sources :

Example 1 with MoveType

use of org.eclipse.che.ide.ext.java.client.refactoring.move.MoveType in project che by eclipse.

the class MoveViewImpl method show.

/** {@inheritDoc} */
@Override
public void show(RefactorInfo refactorInfo) {
    MoveType moveType = refactorInfo.getMoveType();
    RefactoredItemType refactoredItemType = refactorInfo.getRefactoredItemType();
    treePanelToHide.setVisible(REFACTOR_MENU.equals(moveType));
    patternsPanelToHide.setVisible(COMPILATION_UNIT.equals(refactoredItemType));
    Resource[] selectedItems = refactorInfo.getResources();
    int selectionSize = selectedItems.length;
    boolean isMultiSelection = selectionSize > 1;
    classNameUR.setText(isMultiSelection ? locale.multiSelectionReferences(selectionSize) : selectedItems[0].getName());
    className.setText(isMultiSelection ? locale.multiSelectionDestination(selectionSize) : selectedItems[0].getName());
    show();
}
Also used : Resource(org.eclipse.che.ide.api.resources.Resource) MoveType(org.eclipse.che.ide.ext.java.client.refactoring.move.MoveType) RefactoredItemType(org.eclipse.che.ide.ext.java.client.refactoring.move.RefactoredItemType)

Aggregations

Resource (org.eclipse.che.ide.api.resources.Resource)1 MoveType (org.eclipse.che.ide.ext.java.client.refactoring.move.MoveType)1 RefactoredItemType (org.eclipse.che.ide.ext.java.client.refactoring.move.RefactoredItemType)1