@Nonnull @Override protected JComponent createCenterComponent() { myTabbedPane = new TabbedPaneWrapper(myDisposable); for (OrderRootType type : OrderRootType.getAllTypes()) { if (showTabForType(type)) { final OrderRootTypeUIFactory factory = OrderRootTypeUIFactory.FACTORY.getByKey(type); if(factory == null) { continue; } SdkPathEditor pathEditor = getPathEditor(type); myTabbedPane.addTab(pathEditor.getDisplayName(), pathEditor.createComponent()); } } myTabbedPane.addChangeListener(new ChangeListener() { @Override public void stateChanged(final ChangeEvent e) { myHistory.pushQueryPlace(); } }); return myTabbedPane.getComponent(); }
@Override public SdkPathEditor createPathEditor(final Sdk sdk) { return new SdkPathEditor(ProjectBundle.message("sdk.configure.sourcepath.tab"), OrderRootType.SOURCES, new FileChooserDescriptor(true, true, true, false, true, true)) { @Override protected VirtualFile[] adjustAddedFileSet(final Component component, final VirtualFile[] files) { if (sdk.getSdkType() instanceof JavaSdkType) { return PathUIUtils.scanAndSelectDetectedJavaSourceRoots(component, files); } return super.adjustAddedFileSet(component, files); } }; }
@Override public SdkPathEditor createPathEditor(final Sdk sdk) { FileChooserDescriptor descriptor = new FileChooserDescriptor(true, true, true, false, true, true); return new SourcesPathEditor(sdk, descriptor); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return null; }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new SdkPathEditor(ProjectBundle.message("sdk.configure.annotations.tab"), AnnotationOrderRootType.getInstance(), new FileChooserDescriptor(false, true, true, false, true, false)); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { FileChooserDescriptor descriptor = new FileChooserDescriptor(true, true, true, false, true, true); return new MySdkPathEditor(descriptor); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new JavadocPathsEditor(sdk, FileChooserDescriptorFactory.createMultipleJavaPathDescriptor()); }
@Nullable SdkPathEditor createPathEditor(Sdk sdk);
@Override @Nullable public SdkPathEditor createPathEditor(Sdk sdk) { return null; }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new SdkPathEditor(getNodeText(), LibFileRootType.getInstance(), FileChooserDescriptorFactory.createSingleLocalFileDescriptor()); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new SdkPathEditor(ProjectBundle.message("sdk.configure.classpath.tab"), OrderRootType.CLASSES, new FileChooserDescriptor(true, true, true, false, true, true)); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new JavadocPathsEditor(sdk); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new SdkPathEditor(getNodeText(), ExternalAttributesRootOrderType.getInstance(), FileChooserDescriptorFactory.createSingleLocalFileDescriptor(), sdk); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new SdkPathEditor(ProjectBundle.message("library.binaries.node"), BinariesOrderRootType.getInstance(), new FileChooserDescriptor(true, true, true, false, true, true), sdk); }
@Override public SdkPathEditor createPathEditor(final Sdk sdk) { return new SdkPathEditor(ProjectBundle.message("library.sources.node"), SourcesOrderRootType.getInstance(), new FileChooserDescriptor(true, true, true, false, true, true), sdk); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new DocumentationPathsEditor(sdk); }
@Override public SdkPathEditor createPathEditor(Sdk sdk) { return new SdkPathEditor(JavaCoreBundle.message("sdk.configure.external.annotations.tab"), AnnotationOrderRootType.getInstance(), new FileChooserDescriptor(false, true, true, false, true, false), sdk); }
SdkPathEditor createPathEditor(Sdk sdk);