org.jboss.forge.addon.ui.UIProvider Java Examples

The following examples show how to use org.jboss.forge.addon.ui.UIProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ListFractionsCommand.java    From thorntail-addon with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public Result execute(UIExecutionContext executionContext) {
    UIProvider provider = executionContext.getUIContext().getProvider();
    UIOutput output = provider.getOutput();
    PrintStream out = output.out();
    for (FractionDescriptor fraction : ThorntailFacet.getAllFractionDescriptors()) {
        if (!fraction.isInternal()) {
            String msg = String.format("%s: %s (%s)", fraction.getArtifactId(), fraction.getName(),
                    fraction.getDescription());
            out.println(msg);
        }
    }
    return Results.success();
}
 
Example #2
Source File: AbstractDevOpsCommand.java    From fabric8-forge with Apache License 2.0 4 votes vote down vote up
public UIOutput getOutput() {
    UIProvider provider = getUiProvider();
    return provider != null ? provider.getOutput() : null;
}
 
Example #3
Source File: AbstractDevOpsCommand.java    From fabric8-forge with Apache License 2.0 4 votes vote down vote up
public UIProvider getUiProvider() {
    return uiProvider;
}
 
Example #4
Source File: AbstractDevOpsCommand.java    From fabric8-forge with Apache License 2.0 4 votes vote down vote up
public void setUiProvider(UIProvider uiProvider) {
    this.uiProvider = uiProvider;
}
 
Example #5
Source File: AbstractKubernetesCommand.java    From fabric8-forge with Apache License 2.0 4 votes vote down vote up
public UIOutput getOutput() {
    UIProvider provider = getUiProvider();
    return provider != null ? provider.getOutput() : null;
}
 
Example #6
Source File: AbstractKubernetesCommand.java    From fabric8-forge with Apache License 2.0 4 votes vote down vote up
public UIProvider getUiProvider() {
    return uiProvider;
}
 
Example #7
Source File: AbstractKubernetesCommand.java    From fabric8-forge with Apache License 2.0 4 votes vote down vote up
public void setUiProvider(UIProvider uiProvider) {
    this.uiProvider = uiProvider;
}
 
Example #8
Source File: AbstractIntrospectionCommand.java    From fabric8-forge with Apache License 2.0 4 votes vote down vote up
public void setUiProvider(UIProvider uiProvider) {
	this.uiProvider = uiProvider;
}
 
Example #9
Source File: RunCommand.java    From thorntail-addon with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public boolean isEnabled(UIContext context)
{
   UIProvider provider = context.getProvider();
   return super.isEnabled(context) && !provider.isGUI() && !provider.isEmbedded();
}