use of com.intellij.uiDesigner.editor.UIFormEditor in project intellij-community by JetBrains.
the class ReloadCustomComponentsAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
Project project = e.getData(CommonDataKeys.PROJECT);
if (project == null)
return;
LoaderFactory.getInstance(project).clearClassLoaderCache();
final FileEditor[] fileEditors = FileEditorManager.getInstance(project).getAllEditors();
for (FileEditor editor : fileEditors) {
if (editor instanceof UIFormEditor) {
((UIFormEditor) editor).getEditor().readFromFile(true);
}
}
}
use of com.intellij.uiDesigner.editor.UIFormEditor in project intellij-community by JetBrains.
the class BoundIconRenderer method getClickAction.
@Override
@Nullable
public AnAction getClickAction() {
return new AnAction() {
@Override
public void actionPerformed(AnActionEvent e) {
List<PsiFile> formFiles = getBoundFormFiles();
if (formFiles.size() > 0) {
final VirtualFile virtualFile = formFiles.get(0).getVirtualFile();
if (virtualFile == null) {
return;
}
Project project = myElement.getProject();
FileEditor[] editors = FileEditorManager.getInstance(project).openFile(virtualFile, true);
if (myElement instanceof PsiField) {
for (FileEditor editor : editors) {
if (editor instanceof UIFormEditor) {
((UIFormEditor) editor).selectComponent(((PsiField) myElement).getName());
}
}
}
}
}
};
}
use of com.intellij.uiDesigner.editor.UIFormEditor in project intellij-community by JetBrains.
the class FormElementNavigatable method navigate.
public void navigate(boolean requestFocus) {
if (!myVirtualFile.isValid())
return;
OpenFileDescriptor descriptor = new OpenFileDescriptor(myProject, myVirtualFile);
final List<FileEditor> fileEditors = FileEditorManager.getInstance(myProject).openEditor(descriptor, requestFocus);
if (myComponentId != null) {
for (FileEditor editor : fileEditors) {
if (editor instanceof UIFormEditor) {
((UIFormEditor) editor).selectComponentById(myComponentId);
break;
}
}
}
}
Aggregations