# HG changeset patch # Parent 1cb48d19b213f0f275c27d83cd7000fb5017a19a diff --git a/coherence/nbproject/project.xml b/coherence/nbproject/project.xml --- a/coherence/nbproject/project.xml +++ b/coherence/nbproject/project.xml @@ -162,7 +162,7 @@ 0 - 1.14 + 1.18 diff --git a/coherence/src/org/netbeans/modules/coherence/wizards/BottomWizardPanel.java b/coherence/src/org/netbeans/modules/coherence/wizards/BottomWizardPanel.java --- a/coherence/src/org/netbeans/modules/coherence/wizards/BottomWizardPanel.java +++ b/coherence/src/org/netbeans/modules/coherence/wizards/BottomWizardPanel.java @@ -57,6 +57,8 @@ import org.netbeans.api.project.libraries.LibrariesCustomizer; import org.netbeans.api.project.libraries.Library; import org.netbeans.api.project.libraries.LibraryManager; +import org.netbeans.api.server.CommonServerUIs; +import org.netbeans.api.server.ServerInstance; import org.netbeans.modules.coherence.library.LibraryUtils; import org.netbeans.modules.coherence.project.CoherenceProjectUtils; import org.netbeans.spi.project.ui.templates.support.Templates; @@ -222,7 +224,11 @@ initLibrariesPanel(); } } else { - // waiting for new API for new server creation + ServerInstance serverInstance = CommonServerUIs.showCreateNewServerCustomizer(); + if (serverInstance != null) { + cleanInitialized(); + initLibrariesPanel(); + } } } } diff --git a/coherence/src/org/netbeans/modules/coherence/wizards/ServerOrLibraryPanel.java b/coherence/src/org/netbeans/modules/coherence/wizards/ServerOrLibraryPanel.java --- a/coherence/src/org/netbeans/modules/coherence/wizards/ServerOrLibraryPanel.java +++ b/coherence/src/org/netbeans/modules/coherence/wizards/ServerOrLibraryPanel.java @@ -52,8 +52,6 @@ */ public ServerOrLibraryPanel() { initComponents(); - // waiting for new API for new server creation - platformRadioButton.setEnabled(false); } public boolean getLibraryChecked() { diff --git a/server/apichanges.xml b/server/apichanges.xml --- a/server/apichanges.xml +++ b/server/apichanges.xml @@ -110,6 +110,18 @@ + + + Added UI helper method CommonServerUIs.showCreateNewServerCustomizer + + + + + + Added helper method invoking wizard for adding new server instance. + + + Establish layer to register cloud providers diff --git a/server/manifest.mf b/server/manifest.mf --- a/server/manifest.mf +++ b/server/manifest.mf @@ -2,7 +2,7 @@ OpenIDE-Module: org.netbeans.modules.server/0 OpenIDE-Module-Layer: org/netbeans/modules/server/resources/layer.xml OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/server/resources/Bundle.properties -OpenIDE-Module-Specification-Version: 1.17 +OpenIDE-Module-Specification-Version: 1.18 AutoUpdate-Show-In-Client: false OpenIDE-Module-Provides: org.netbeans.modules.server diff --git a/server/nbproject/project.xml b/server/nbproject/project.xml --- a/server/nbproject/project.xml +++ b/server/nbproject/project.xml @@ -50,6 +50,24 @@ org.netbeans.modules.server + org.netbeans.api.annotations.common + + + + 1 + 1.13 + + + + org.netbeans.core.ide + + + + 1 + 1.15 + + + org.openide.awt @@ -98,15 +116,6 @@ - org.netbeans.core.ide - - - - 1 - 1.15 - - - org.openide.util diff --git a/server/src/org/netbeans/api/server/CommonServerUIs.java b/server/src/org/netbeans/api/server/CommonServerUIs.java --- a/server/src/org/netbeans/api/server/CommonServerUIs.java +++ b/server/src/org/netbeans/api/server/CommonServerUIs.java @@ -50,8 +50,10 @@ import org.openide.util.NbBundle; import javax.swing.JButton; import javax.swing.SwingUtilities; +import org.netbeans.api.annotations.common.CheckForNull; import org.netbeans.modules.server.ServerRegistry; import org.netbeans.modules.server.ui.manager.ServerManagerPanel; +import org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard; /** * Class providing access to UI dialogs managing instances. @@ -113,4 +115,19 @@ dlg.dispose(); } } + + /** + * Displays the modal wizard for creating new server instance. This method must be + * called from the AWT event dispatch thread. + * + * @return created instance or {@code null} if user canceled the operation + * @since 1.18 + */ + @CheckForNull + public static ServerInstance showCreateNewServerCustomizer() { + assert SwingUtilities.isEventDispatchThread() : "Can lead to invocation of the UI dialog outside EDT"; //NOI18N + + final ServerInstance instance = AddServerInstanceWizard.showAddServerInstanceWizard(); + return instance; + } }