Skip to content

Commit

Permalink
show appropriate status
Browse files Browse the repository at this point in the history
  • Loading branch information
koentsje committed Feb 5, 2014
1 parent 5ead95e commit af9db6a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.eclipse.ui.part.IPage;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.PageSite;
import org.jboss.tools.forge.core.process.ForgeRuntime;
import org.jboss.tools.forge.ui.console.ForgeConsole;

public class ForgeConsolePage implements IPage {
Expand Down Expand Up @@ -77,4 +78,14 @@ void deactivateActionBars() {
actionBars.deactivate();
}

void show() {
forgeConsolePageBook.showPage(getControl());
forgeConsolePageBook.updateStatusMessage(getStatusMessage());
}

String getStatusMessage() {
ForgeRuntime runtime = forgeConsole.getRuntime();
return "Forge " + runtime.getName() + " @ " + runtime.getLocation();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ public void showForgeConsole(ForgeConsole forgeConsole) {
}
ForgeConsolePage page = forgeConsoleToPage.get(forgeConsole);
if (page != null) {
forgeConsoleView.setStatusMessage(forgeConsole.getName());
showPage(page.getControl());
// forgeConsoleView.setStatusMessage(forgeConsole.getName());
// showPage(page.getControl());
page.show();
page.activateActionBars();
currentPage = page;
}
getViewSite().getActionBars().updateActionBars();
}

void updateStatusMessage(String message) {
forgeConsoleView.setStatusMessage(message);
}

}

0 comments on commit af9db6a

Please sign in to comment.