Search in sources :

Example 1 with ClassNameReferenceEditor

use of com.intellij.refactoring.ui.ClassNameReferenceEditor in project intellij-community by JetBrains.

the class MoveClassesOrPackagesDialog method createUIComponents.

private void createUIComponents() {
    myMainPanel = new JPanel();
    myWithBrowseButtonReference = createPackageChooser();
    myClassPackageChooser = createPackageChooser();
    GlobalSearchScope scope = JavaProjectRootsUtil.getScopeWithoutGeneratedSources(ProjectScope.getProjectScope(myProject), myProject);
    myInnerClassChooser = new ClassNameReferenceEditor(myProject, null, scope);
    myInnerClassChooser.addDocumentListener(new DocumentAdapter() {

        public void documentChanged(DocumentEvent e) {
            validateButtons();
        }
    });
    // override CardLayout sizing behavior
    myCardPanel = new JPanel() {

        public Dimension getMinimumSize() {
            return myHavePackages ? myMovePackagePanel.getMinimumSize() : myMoveClassPanel.getMinimumSize();
        }

        public Dimension getPreferredSize() {
            return myHavePackages ? myMovePackagePanel.getPreferredSize() : myMoveClassPanel.getPreferredSize();
        }
    };
    myDestinationFolderCB = new DestinationFolderComboBox() {

        @Override
        public String getTargetPackage() {
            return MoveClassesOrPackagesDialog.this.getTargetPackage();
        }
    };
}
Also used : ClassNameReferenceEditor(com.intellij.refactoring.ui.ClassNameReferenceEditor) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) DocumentAdapter(com.intellij.openapi.editor.event.DocumentAdapter) DocumentEvent(com.intellij.openapi.editor.event.DocumentEvent)

Aggregations

DocumentAdapter (com.intellij.openapi.editor.event.DocumentAdapter)1 DocumentEvent (com.intellij.openapi.editor.event.DocumentEvent)1 GlobalSearchScope (com.intellij.psi.search.GlobalSearchScope)1 ClassNameReferenceEditor (com.intellij.refactoring.ui.ClassNameReferenceEditor)1