diff options
author | Niraj Modi | 2014-08-28 06:27:17 +0000 |
---|---|---|
committer | Niraj Modi | 2014-08-28 14:57:10 +0000 |
commit | 30c3ac06c6d0a8247bf89dd3e33069c7680a708d (patch) | |
tree | 4d163922f755c08172c7d183c8a26c4ce408005c /bundles/org.eclipse.swt/Eclipse SWT PI/win32/org | |
parent | 3aca6b6833eceb7c67f6d30f68af1f5bf45bfcd3 (diff) | |
download | eclipse.platform.swt-30c3ac06c6d0a8247bf89dd3e33069c7680a708d.tar.gz eclipse.platform.swt-30c3ac06c6d0a8247bf89dd3e33069c7680a708d.tar.xz eclipse.platform.swt-30c3ac06c6d0a8247bf89dd3e33069c7680a708d.zip |
Bug 409553 - Clear text in Text.setTextChars(char[] text)
Change-Id: I3903a15480f0c1b00f013182ed4068fd5eaa81b7
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/win32/org')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCHAR.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCHAR.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCHAR.java index 8791ef2342..2eebd3ec3b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCHAR.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TCHAR.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2014 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 @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.swt.internal.win32; +import java.util.Arrays; /** * This class implements the conversions between unicode characters @@ -73,6 +74,14 @@ static char [] getChars (String string, boolean terminate) { return chars; } +public void clear() { + if (OS.IsUnicode) { + Arrays.fill (chars, (char) 0); + } else { + Arrays.fill (bytes, (byte) 0); + } +} + public int length () { if (OS.IsUnicode) { return chars.length; |