use of com.intellij.facet.ui.FacetEditorTab in project intellij-plugins by JetBrains.
the class StrutsFacetConfiguration method createEditorTabs.
public FacetEditorTab[] createEditorTabs(final FacetEditorContext editorContext, final FacetValidatorsManager validatorsManager) {
final FacetLibrariesValidator validator = FacetEditorsFactory.getInstance().createLibrariesValidator(LibraryInfo.EMPTY_ARRAY, new StrutsFacetLibrariesValidatorDescription(), editorContext, validatorsManager);
validatorsManager.registerValidator(validator);
return new FacetEditorTab[] { new FileSetConfigurationTab(this, editorContext), new FeaturesConfigurationTab(this) };
}
use of com.intellij.facet.ui.FacetEditorTab in project intellij-plugins by JetBrains.
the class OsmorcFacetConfiguration method createEditorTabs.
@Override
public FacetEditorTab[] createEditorTabs(FacetEditorContext context, FacetValidatorsManager validatorsManager) {
FrameworkLibraryValidator validator = OsgiCoreLibraryType.getValidator(context, validatorsManager);
validatorsManager.registerValidator(validator);
return new FacetEditorTab[] { new OsmorcFacetGeneralEditorTab(context, validatorsManager), new OsmorcFacetJAREditorTab(context, validatorsManager), new OsmorcFacetManifestGenerationEditorTab(context) };
}
use of com.intellij.facet.ui.FacetEditorTab in project intellij-community by JetBrains.
the class FacetEditorImpl method createComponent.
@Override
public JComponent createComponent() {
final JComponent editorComponent;
if (myEditorTabs.length > 1) {
final TabbedPaneWrapper tabbedPane = new TabbedPaneWrapper(myDisposable);
for (FacetEditorTab editorTab : myEditorTabs) {
JComponent c = editorTab.createComponent();
UIUtil.addInsets(c, UIUtil.PANEL_SMALL_INSETS);
tabbedPane.addTab(editorTab.getDisplayName(), c);
}
tabbedPane.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(@NotNull ChangeEvent e) {
myEditorTabs[mySelectedTabIndex].onTabLeaving();
mySelectedTabIndex = tabbedPane.getSelectedIndex();
onTabSelected(myEditorTabs[mySelectedTabIndex]);
}
});
editorComponent = tabbedPane.getComponent();
myTabbedPane = tabbedPane;
} else if (myEditorTabs.length == 1) {
editorComponent = myEditorTabs[0].createComponent();
UIUtil.addInsets(editorComponent, JBUI.insets(0, 5, 0, 0));
} else {
editorComponent = new JPanel();
}
final JComponent errorComponent = myErrorPanel.getComponent();
UIUtil.addInsets(errorComponent, JBUI.insets(0, 5, 5, 0));
final JPanel panel = new JPanel(new BorderLayout());
panel.add(BorderLayout.CENTER, editorComponent);
panel.add(BorderLayout.SOUTH, errorComponent);
return panel;
}
Aggregations