/******************************************************************************* * Copyright (c) 2012-2015 Codenvy, S.A. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ package org.eclipse.che.ide.extension.builder.client.console.indicators; import org.eclipse.che.ide.api.action.ActionEvent; import org.eclipse.che.ide.api.action.Presentation; import org.eclipse.che.ide.extension.builder.client.BuilderResources; import org.eclipse.che.ide.extension.builder.client.build.BuildController; import com.google.inject.Inject; import com.google.inject.Singleton; /** * Action used to show artifact download URL. * * @author Artem Zatsarynnyy */ @Singleton public class ArtifactURLIndicator extends IndicatorAction { private final BuildController buildController; @Inject public ArtifactURLIndicator(BuildController buildController, BuilderResources resources) { super("Artifact", true, 205, resources); this.buildController = buildController; } @Override public void update(ActionEvent e) { final Presentation presentation = e.getPresentation(); presentation.putClientProperty(Properties.DATA_PROPERTY, buildController.getLastBuildResultURL()); } }