Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBIDE-16521 - zipped publish checkbox is grey #200

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -206,6 +206,7 @@ public IProvideCredentials getFirstCredentialProvider(IServerProvider serverProv
}

private ArrayList<PublisherWrapper> publishers;
@Deprecated
public IJBossServerPublisher getPublisher(IServer server, IModule[] module, String deployMethod) {
if( publishers == null )
loadPublishers();
Expand All @@ -220,6 +221,7 @@ public IJBossServerPublisher getPublisher(IServer server, IModule[] module, Stri
return null;
}

@Deprecated
private void loadPublishers() {
ArrayList<PublisherWrapper> publishers = new ArrayList<PublisherWrapper>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
Expand Down Expand Up @@ -255,6 +257,7 @@ public int compare(PublisherWrapper o1, PublisherWrapper o2) {
Collections.sort(this.publishers, comparator);
}

@Deprecated
private class PublisherWrapper {
private int priority;
private IJBossServerPublisher publisher;
Expand All @@ -280,6 +283,7 @@ public String toString() {
}
}

@Deprecated
public IJBossServerPublisher[] getZippedPublishers() {
if( publishers == null )
loadPublishers();
Expand Down
Expand Up @@ -455,21 +455,10 @@ public void radioSelected(Object c) {
}

protected boolean isZippedPublisherAvailable() {
/*
* Maybe use IJBossServerPublishMethodType type = DeploymentPreferenceLoader.getCurrentDeploymentMethodType(getServer());
* But this class has no reference to the server, and it also might not want to go by stored data,
* but rather the combo in the ModuleDeploymentPage somehow?
*/

// String method = DeploymentPreferenceLoader.getCurrentDeploymentMethodType(getServer()).getId();
String method = LocalPublishMethod.LOCAL_PUBLISH_METHOD;
IJBossServerPublisher[] publishers =
ExtensionManager.getDefault().getZippedPublishers();
for( int i = 0; i < publishers.length; i++ ) {
if( publishers[i].accepts(method, getServer().getServer(), null))
return true;
}
return false;
// Zipped publisher is always available after rewrite.
// ASTools now depends on archives and doesn't need to do weird logic
// to find a zipped publisher
return true;
}

public class SetDeployDirCommand extends ServerCommand {
Expand Down