Search in sources :

Example 1 with FacetEditorTab

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) };
}
Also used : FeaturesConfigurationTab(com.intellij.struts2.facet.ui.FeaturesConfigurationTab) FacetEditorTab(com.intellij.facet.ui.FacetEditorTab) FileSetConfigurationTab(com.intellij.struts2.facet.ui.FileSetConfigurationTab) FacetLibrariesValidator(com.intellij.facet.ui.libraries.FacetLibrariesValidator)

Example 2 with FacetEditorTab

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) };
}
Also used : FrameworkLibraryValidator(com.intellij.facet.ui.libraries.FrameworkLibraryValidator) OsmorcFacetManifestGenerationEditorTab(org.osmorc.facet.ui.OsmorcFacetManifestGenerationEditorTab) FacetEditorTab(com.intellij.facet.ui.FacetEditorTab) OsmorcFacetGeneralEditorTab(org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab) OsmorcFacetJAREditorTab(org.osmorc.facet.ui.OsmorcFacetJAREditorTab)

Example 3 with FacetEditorTab

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;
}
Also used : ChangeEvent(javax.swing.event.ChangeEvent) TabbedPaneWrapper(com.intellij.ui.TabbedPaneWrapper) FacetEditorTab(com.intellij.facet.ui.FacetEditorTab) ChangeListener(javax.swing.event.ChangeListener)

Aggregations

FacetEditorTab (com.intellij.facet.ui.FacetEditorTab)3 FacetLibrariesValidator (com.intellij.facet.ui.libraries.FacetLibrariesValidator)1 FrameworkLibraryValidator (com.intellij.facet.ui.libraries.FrameworkLibraryValidator)1 FeaturesConfigurationTab (com.intellij.struts2.facet.ui.FeaturesConfigurationTab)1 FileSetConfigurationTab (com.intellij.struts2.facet.ui.FileSetConfigurationTab)1 TabbedPaneWrapper (com.intellij.ui.TabbedPaneWrapper)1 ChangeEvent (javax.swing.event.ChangeEvent)1 ChangeListener (javax.swing.event.ChangeListener)1 OsmorcFacetGeneralEditorTab (org.osmorc.facet.ui.OsmorcFacetGeneralEditorTab)1 OsmorcFacetJAREditorTab (org.osmorc.facet.ui.OsmorcFacetJAREditorTab)1 OsmorcFacetManifestGenerationEditorTab (org.osmorc.facet.ui.OsmorcFacetManifestGenerationEditorTab)1