IDEX-3849: Add information about project to git output panel.

Signed-off-by: Dmitry Shnurenko <dshnurenko@codenvy.com>
6.19.x
Dmitry Shnurenko 2016-02-15 13:11:01 +02:00
parent 6bb0aa775e
commit 09b5523784
3 changed files with 15 additions and 8 deletions

View File

@ -661,4 +661,7 @@ public interface GitLocalizationConstant extends Messages {
@Key("merge.failed") @Key("merge.failed")
String mergeFailed(); String mergeFailed();
@Key("console.project.name")
String consoleProjectName(String projectName);
} }

View File

@ -13,8 +13,9 @@ package org.eclipse.che.ide.ext.git.client.outputconsole;
import com.google.gwt.user.client.ui.AcceptsOneWidget; import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.Assisted;
import com.google.web.bindery.event.shared.EventBus;
import org.eclipse.che.ide.api.app.AppContext;
import org.eclipse.che.ide.ext.git.client.GitLocalizationConstant;
import org.eclipse.che.ide.ext.git.client.GitResources; import org.eclipse.che.ide.ext.git.client.GitResources;
import org.vectomatic.dom.svg.ui.SVGResource; import org.vectomatic.dom.svg.ui.SVGResource;
@ -25,22 +26,26 @@ import org.vectomatic.dom.svg.ui.SVGResource;
*/ */
public class GitOutputConsolePresenter implements GitOutputPartView.ActionDelegate, GitOutputConsole { public class GitOutputConsolePresenter implements GitOutputPartView.ActionDelegate, GitOutputConsole {
private String title;
private final GitOutputPartView view; private final GitOutputPartView view;
private final GitResources resources; private final GitResources resources;
private final String title;
/** Construct empty Part */ /** Construct empty Part */
@Inject @Inject
public GitOutputConsolePresenter(GitOutputPartView view, public GitOutputConsolePresenter(GitOutputPartView view,
GitResources resources, GitResources resources,
final EventBus eventBus, AppContext appContext,
GitLocalizationConstant locale,
@Assisted String title) { @Assisted String title) {
this.view = view; this.view = view;
this.title = title;
this.resources = resources;
this.view.setDelegate(this); this.view.setDelegate(this);
this.title = title;
this.resources = resources;
String projectName = appContext.getCurrentProject().getRootProject().getName();
view.print(locale.consoleProjectName(projectName) + "\n");
} }
/** {@inheritDoc} */ /** {@inheritDoc} */

View File

@ -148,8 +148,6 @@ view.create.title=Initialize local repository
view.compare.with.latest.title=Compare with latest repository version view.compare.with.latest.title=Compare with latest repository version
view.compare.with.branch.title=Compare with branch view.compare.with.branch.title=Compare with branch
view.compare.with.revision.title=Compare with revision view.compare.with.revision.title=Compare with revision
view.compare.branch.list.title=Select branch to compare
view.compare.revision.list.title=Select revision to compare
view.compare.revision.table.id.title=Id view.compare.revision.table.id.title=Id
view.compare.revision.table.time.title=Time view.compare.revision.table.time.title=Time
view.compare.revision.table.author.title=Author view.compare.revision.table.author.title=Author
@ -255,6 +253,7 @@ committer.title = Committer
################ Git console ################ ################ Git console ################
console.tooltip.scroll=Click this button to navigate to the bottom of the console. console.tooltip.scroll=Click this button to navigate to the bottom of the console.
console.tooltip.clear=Click this button to remove all text from the console. console.tooltip.clear=Click this button to remove all text from the console.
console.project.name=Project name: {0}
commited=Commited commited=Commited
failed.to.delete.repository=Failed to delete repository failed.to.delete.repository=Failed to delete repository