Author: koen.aers(a)jboss.com
Date: 2012-05-23 06:17:24 -0400 (Wed, 23 May 2012)
New Revision: 41277
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/document/ForgeDocument.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/SelectionSynchronizer.java
Log:
JBIDE-11919: Forge Console in JBDS/Tools - Screen "Garbage"
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java 2012-05-23
10:09:06 UTC (rev 41276)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java 2012-05-23
10:17:24 UTC (rev 41277)
@@ -48,7 +48,7 @@
if (command == null) return;
refreshWorkspace();
final ForgeCommandPostProcessor postProcessor = getPostProcessors().get(command);
- Display.getDefault().asyncExec(new Runnable() {
+ Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
if (postProcessor != null) {
@@ -85,10 +85,14 @@
private void showForgeConsole() {
IWorkbenchWindow workbenchWindow =
PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
- IViewPart forgeView = workbenchPage.findView(ForgeView.ID);
- if (forgeView != null) {
- forgeView.setFocus();
+ if (workbenchWindow != null) {
+ IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
+ if (workbenchPage != null) {
+ IViewPart forgeView = workbenchPage.findView(ForgeView.ID);
+ if (forgeView != null) {
+ forgeView.setFocus();
+ }
+ }
}
}
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java 2012-05-23
10:09:06 UTC (rev 41276)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java 2012-05-23
10:17:24 UTC (rev 41277)
@@ -100,11 +100,9 @@
switch (action) {
case ST.LINE_END:
getRuntime().sendInput(END_LINE);
- System.out.println("line end");
break;
case ST.LINE_START:
getRuntime().sendInput(START_LINE);
- System.out.println("line start");
break;
case ST.LINE_UP:
getRuntime().sendInput(PREV_HISTORY);
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/document/ForgeDocument.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/document/ForgeDocument.java 2012-05-23
10:09:06 UTC (rev 41276)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/document/ForgeDocument.java 2012-05-23
10:17:24 UTC (rev 41277)
@@ -26,15 +26,15 @@
void cursorMoved();
}
- private class AsyncForgeCommandFilter extends ForgeCommandFilter {
- public AsyncForgeCommandFilter(ForgeOutputListener listener) {
+ private class SyncForgeCommandFilter extends ForgeCommandFilter {
+ public SyncForgeCommandFilter(ForgeOutputListener listener) {
super(listener);
}
public void outputAvailable(final String output) {
- Display.getDefault().asyncExec(new Runnable() {
+ Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
- AsyncForgeCommandFilter.super.outputAvailable(output);
+ SyncForgeCommandFilter.super.outputAvailable(output);
}
});
}
@@ -72,7 +72,7 @@
executeAnsiCommand(command);
}
};
- outputListener = new AsyncForgeCommandFilter(facf);
+ outputListener = new SyncForgeCommandFilter(facf);
runtime.addOutputListener(outputListener);
}
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/SelectionSynchronizer.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/SelectionSynchronizer.java 2012-05-23
10:09:06 UTC (rev 41276)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/SelectionSynchronizer.java 2012-05-23
10:17:24 UTC (rev 41277)
@@ -51,8 +51,7 @@
@Override
public void partActivated(IWorkbenchPart part) {
- // TODO Auto-generated method stub
-
+ // Ignore
}
};
Show replies by date