Search in sources :

Example 1 with PsiCodeFragmentImpl

use of com.intellij.psi.impl.source.PsiCodeFragmentImpl in project intellij-community by JetBrains.

the class PsiClassControl method createMainComponent.

protected PsiClassPanel createMainComponent(PsiClassPanel boundedComponent, final Project project) {
    if (boundedComponent == null) {
        boundedComponent = new PsiClassPanel();
    }
    ReferenceEditorWithBrowseButton editor = JavaReferenceEditorUtil.createReferenceEditorWithBrowseButton(null, "", project, true);
    Document document = editor.getChildComponent().getDocument();
    PsiCodeFragmentImpl fragment = (PsiCodeFragmentImpl) PsiDocumentManager.getInstance(project).getPsiFile(document);
    assert fragment != null;
    fragment.setIntentionActionsFilter(IntentionFilterOwner.IntentionActionsFilter.EVERYTHING_AVAILABLE);
    fragment.putUserData(ModuleUtil.KEY_MODULE, getDomWrapper().getExistingDomElement().getModule());
    return initReferenceEditorWithBrowseButton(boundedComponent, editor, this);
}
Also used : ReferenceEditorWithBrowseButton(com.intellij.ui.ReferenceEditorWithBrowseButton) Document(com.intellij.openapi.editor.Document) PsiCodeFragmentImpl(com.intellij.psi.impl.source.PsiCodeFragmentImpl)

Aggregations

Document (com.intellij.openapi.editor.Document)1 PsiCodeFragmentImpl (com.intellij.psi.impl.source.PsiCodeFragmentImpl)1 ReferenceEditorWithBrowseButton (com.intellij.ui.ReferenceEditorWithBrowseButton)1