Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2015-05-14 08:50:53 +0000
committerNiraj Modi2015-05-14 08:50:53 +0000
commiteef9aae31d613bddb04ee66908f2982f5fa891a0 (patch)
treea65b3c6a976934c13643d1ca5ab76369f962892f
parente55fd5b3440bd0ec31ca0594f7269409d1ae97f1 (diff)
downloadeclipse.platform.swt-eef9aae31d613bddb04ee66908f2982f5fa891a0.tar.gz
eclipse.platform.swt-eef9aae31d613bddb04ee66908f2982f5fa891a0.tar.xz
eclipse.platform.swt-eef9aae31d613bddb04ee66908f2982f5fa891a0.zip
Bug 433817 - Shell#setText with newlines (\n) causes the shell title to
disappear Change-Id: I701985afc2cd779035b14cb1287513d42bf086c7 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java12
9 files changed, 58 insertions, 14 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
index a76e148442..acdea792db 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* 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
@@ -1075,6 +1075,9 @@ public void setSelection (boolean selected) {
* on Windows (starting with XP), GTK+ and OSX. On other platforms,
* a Button that has an image and text set into it will display the
* image or text that was set most recently.
+ * </p><p>
+ * Also note, if escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
* </p>
* @param string the new text
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index ae098e9283..a16ebfc660 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
@@ -140,7 +140,10 @@ public Combo (Composite parent, int style) {
/**
* Adds the argument to the end of the receiver's list.
- *
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
* @param string the new item
*
* @exception IllegalArgumentException <ul>
@@ -170,6 +173,9 @@ public void add (String string) {
* Note: To add an item at the end of the list, use the
* result of calling <code>getItemCount()</code> as the
* index or use <code>add(String)</code>.
+ * </p><p>
+ * Also note, if escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
* </p>
*
* @param string the new item
@@ -2259,6 +2265,9 @@ public void setSelection (Point selection) {
* setting the text to a string containing line breaks or
* other special characters will probably cause it to
* display incorrectly.
+ * </p><p>
+ * Also note, if escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
* </p>
*
* @param string the new text
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index 5e2a11c204..6432802cff 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* 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
@@ -1339,6 +1339,10 @@ void setSystemMenu () {
* Sets the receiver's text, which is the string that the
* window manager will typically display as the receiver's
* <em>title</em>, to the argument, which must not be null.
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
*
* @param string the new text
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
index a71997230d..26d05d5dd1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* 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
@@ -384,6 +384,9 @@ public void setFont (Font font) {
* platform specific manner. The mnemonic indicator character
* '&amp;' can be escaped by doubling it in the string, causing
* a single '&amp;' to be displayed.
+ * </p><p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
* </p>
* @param string the new text
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index 4b55c77efa..e677343a3a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* 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
@@ -371,6 +371,10 @@ public void setImage (Image image) {
* '&amp;' can be escaped by doubling it in the string, causing
* a single '&amp;' to be displayed.
* </p>
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
*
* @param string the new text
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index 1764a67ade..0e9192a029 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* 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
@@ -83,7 +83,10 @@ public List (Composite parent, int style) {
}
/**
* Adds the argument to the end of the receiver's list.
- *
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
* @param string the new item
*
* @exception IllegalArgumentException <ul>
@@ -112,6 +115,9 @@ public void add (String string) {
* Note: To add an item at the end of the list, use the
* result of calling <code>getItemCount()</code> as the
* index or use <code>add(String)</code>.
+ * </p><p>
+ * Also note, if escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
* </p>
*
* @param string the new item
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
index 06222a98df..db6f53bd9e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* 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
@@ -1145,7 +1145,10 @@ public void setImageIndent (int indent) {
/**
* Sets the text for multiple columns in the table.
- *
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
* @param strings the array of new strings
*
* @exception IllegalArgumentException <ul>
@@ -1167,7 +1170,10 @@ public void setText (String [] strings) {
/**
* Sets the receiver's text at a column
- *
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
* @param index the column index
* @param string the new text
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index e43cd53940..1100dc5dc1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -2244,7 +2244,10 @@ void setTabStops (int tabs) {
* Sets the contents of the receiver to the given string. If the receiver has style
* SINGLE and the argument contains multiple lines of text, the result of this
* operation is undefined and may vary from platform to platform.
- *
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
* @param string the new text
*
* @exception IllegalArgumentException <ul>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index 6cce746fea..600c9fb55b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* 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
@@ -1735,7 +1735,10 @@ public void setItemCount (int count) {
/**
* Sets the text for multiple columns in the tree.
- *
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
* @param strings the array of new strings
*
* @exception IllegalArgumentException <ul>
@@ -1759,7 +1762,10 @@ public void setText (String [] strings) {
/**
* Sets the receiver's text at a column
- *
+ * <p>
+ * Note: If escape characters like '\n', '\t' etc. are used
+ * in the string, then the behavior is platform dependent.
+ * </p>
* @param index the column index
* @param string the new text
*

Back to the top