Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Swanson2001-07-03 15:05:13 +0000
committerDarin Swanson2001-07-03 15:05:13 +0000
commit6d095a523430e7eb113f8c609f6129cf72975b2f (patch)
tree509669cb8a7449c8ea9f420331e49892450a56c8
parent80945bff1813164301fe6c764f8117156bd8ad2d (diff)
downloadeclipse.platform.debug-6d095a523430e7eb113f8c609f6129cf72975b2f.tar.gz
eclipse.platform.debug-6d095a523430e7eb113f8c609f6129cf72975b2f.tar.xz
eclipse.platform.debug-6d095a523430e7eb113f8c609f6129cf72975b2f.zip
*** empty log message ***
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java35
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java2
3 files changed, 32 insertions, 19 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java
index a21055c16..08d60a7c4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java
@@ -21,6 +21,8 @@ import org.eclipse.swt.widgets.Display;
public class ConsoleDocument extends AbstractDocument implements IDebugEventListener {
private boolean fClosed= false;
+
+ protected boolean fCanWrite= true;
protected IProcess fProcess;
private IStreamsProxy fProxy;
@@ -77,6 +79,7 @@ public class ConsoleDocument extends AbstractDocument implements IDebugEventList
*/
protected void fireDocumentChanged(DocumentEvent event) {
super.fireDocumentChanged(event);
+
String eventText= event.getText();
if (eventText == null || 0 >= eventText.length() || eventText.length() > 2) {
return;
@@ -84,18 +87,28 @@ public class ConsoleDocument extends AbstractDocument implements IDebugEventList
String[] lineDelimiters= event.getDocument().getLegalLineDelimiters();
for (int i= 0; i < lineDelimiters.length; i++) {
if (lineDelimiters[i].equals(eventText)) {
- try {
- String inText= event.getDocument().get();
- inText= inText.substring(fNewStreamWriteEnd, inText.length());
- if (inText.length() == 0) {
- return;
- }
- fProxy.write(inText);
- fLastStreamWriteEnd= getLength();
+ String inText= event.getDocument().get();
+ inText= inText.substring(fNewStreamWriteEnd, inText.length());
+ if (inText.length() == 0) {
return;
- } catch (IOException ioe) {
- DebugUIUtils.logError(ioe);
- }
+ }
+ if (fCanWrite) {
+ final String input= inText;
+ Runnable runnable= new Runnable() {
+ public void run() {
+ try {
+ fCanWrite= false;
+ fProxy.write(input);
+ fCanWrite= true;
+ } catch (IOException ioe) {
+ DebugUIUtils.logError(ioe);
+ }
+ }
+ };
+ Thread proxyWriter= new Thread(runnable);
+ proxyWriter.start();
+ fLastStreamWriteEnd= getLength();
+ }
}
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties
index 37d4a5e79..6c53763c7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties
@@ -75,10 +75,10 @@ change_variable_value_action.dialog.message=Enter the new value for the variable
change_variable_value_action.dialog.invalid=Value is not valid for the variable \"{0}\"
change_variable_value_action.dialog.title=Change Variable Value
-clear_output_action.text=&Clear Output
+clear_output_action.text=Clear &Output
clear_output_action.toolTipText=Clear Output
-copy_action.label=Copy@Ctrl+C
+copy_action.label=&Copy@Ctrl+C
copy_action.tooltip=Copy
copy_action.description=Copy
@@ -87,7 +87,7 @@ copy_to_clipboard_action.toolTipText=Copy to Clipboard
##only needed due to inheritance
copy_to_clipboard_action.status=
-cut_action.label=Cut@Ctrl+X
+cut_action.label=Cu&t@Ctrl+X
cut_action.tooltip=Cut
cut_action.description=Cut
@@ -111,12 +111,12 @@ execution_action.error.title= Error finding default launchers
execution_action.error.message=Exceptions occurred determining the default launcher(s)
execution_action.status=Error occurred retrieving default launcher
-find_replace_action.label=Find/Replace@Ctrl+F
+find_replace_action.label=&Find/Replace@Ctrl+F
find_replace_action.tooltip=Find/Replace
find_replace_action.image=
find_replace_action.description=Find/Replace
-goto_line_action.label=Goto Line@Ctrl+G
+goto_line_action.label=Goto &Line@Ctrl+G
goto_line_action.tooltip=Goto Line
goto_line_action.image=
goto_line_action.description=Goto Line
@@ -131,7 +131,7 @@ launch_with_action.text.run=Run
open_breakpoint_marker_action.text=&Go to File
open_breakpoint_marker_action.toolTipText=Go to File for Breakpoint
-paste_action.label=Paste@Ctrl+V
+paste_action.label=&Paste@Ctrl+V
paste_action.tooltip=Paste
paste_action.description=Pastes clipboard text
@@ -170,7 +170,7 @@ resume_action.error.message=Exceptions occurred attempting to resume
run_action.text=R&un@Alt+F9
run_action.toolTipText=Run
-select_all_action.label=Select All@Ctrl+A
+select_all_action.label=Select &All@Ctrl+A
select_all_action.tooltip=Select All
select_all_action.description=Select All
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java
index 6ef5c30e5..014614f3a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java
@@ -172,7 +172,7 @@ public class LauncherPropertyPage extends PropertyPage implements IWorkbenchPref
*/
public boolean performOk() {
IProject project= getProject();
- if (project != null) {
+ if (project != null && project.isOpen()) {
boolean ok;
String selection= fCombo.getText();
return saveLauncherProperty(project, selection);

Back to the top