From 722c6d5e4cb0fd516f3f6f88ba8fe028d720afe9 Mon Sep 17 00:00:00 2001 From: khussey Date: Fri, 21 May 2010 15:20:12 +0000 Subject: [310835] Removing unnecessary comments and classes. --- .../util/BasicEList_CustomFieldSerializer.java | 68 ----------------- .../src/org/eclipse/emf/common/util/BasicEMap.java | 78 +------------------- .../util/BasicEMap_CustomFieldSerializer.java | 86 ---------------------- 3 files changed, 1 insertion(+), 231 deletions(-) delete mode 100644 plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEList_CustomFieldSerializer.java delete mode 100644 plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap_CustomFieldSerializer.java diff --git a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEList_CustomFieldSerializer.java b/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEList_CustomFieldSerializer.java deleted file mode 100644 index c026ca364..000000000 --- a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEList_CustomFieldSerializer.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * - * - * Copyright (c) 2010 Ed Merks 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Ed Merks - Initial API and implementation - * - * - * - * $Id: BasicEList_CustomFieldSerializer.java,v 1.1 2010/04/28 14:49:28 emerks Exp $ - */ -package org.eclipse.emf.common.util; - -import com.google.gwt.user.client.rpc.SerializationException; -import com.google.gwt.user.client.rpc.SerializationStreamReader; -import com.google.gwt.user.client.rpc.SerializationStreamWriter; - - -public final class BasicEList_CustomFieldSerializer -{ - @SuppressWarnings("unchecked") - public static void deserialize(SerializationStreamReader reader, BasicEList eList) throws SerializationException - { - reader.readObject(); - - int arrayLength = reader.readInt(); - if (arrayLength > 0) - { - try - { - eList.data = eList.newData(arrayLength); - } - catch (Throwable exception) - { - eList.data = new Object[arrayLength]; - } - - for (int i = 0; i < eList.size; ++i) - { - eList.didAdd(i, eList.assign(i, (E) reader.readObject())); - } - } - } - - public static void serialize(SerializationStreamWriter writer, BasicEList eList) throws SerializationException - { - writer.writeObject(eList); - - if (eList.data == null) - { - writer.writeInt(0); - } - else - { - writer.writeInt(eList.data.length); - for (int i = 0; i < eList.size; ++i) - { - writer.writeObject(eList.data[i]); - } - } - } -} - diff --git a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java b/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java index 65a7cb241..a10013822 100644 --- a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java +++ b/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java @@ -12,14 +12,11 @@ * * * - * $Id: BasicEMap.java,v 1.2 2010/04/28 20:37:42 khussey Exp $ + * $Id: BasicEMap.java,v 1.3 2010/05/21 15:20:12 khussey Exp $ */ package org.eclipse.emf.common.util; -//import java.io.IOException; -//import java.io.ObjectInputStream; -//import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.AbstractCollection; import java.util.AbstractSet; @@ -1459,79 +1456,6 @@ public class BasicEMap implements EMap, Serializable } } - // XXX 245014 -// private void writeObject(ObjectOutputStream objectOutputStream) throws IOException -// { -// objectOutputStream.defaultWriteObject(); -// writeEntries(objectOutputStream); -// } - - // XXX 245014 -// protected void writeEntries(ObjectOutputStream objectOutputStream) throws IOException -// { -// objectOutputStream.writeInt(size); -// -// if (entryData == null) -// { -// objectOutputStream.writeInt(0); -// } -// else -// { -// // Write the capacity. -// // -// objectOutputStream.writeInt(entryData.length); -// -// // Write all the entryData; there will be size of them. -// // -// for (int i = 0; i < entryData.length; ++i) -// { -// BasicEList> eList = entryData[i]; -// if (eList != null) -// { -// Object [] entries = eList.data; -// int size = eList.size; -// for (int j = 0; j < size; ++j) -// { -// @SuppressWarnings("unchecked") Entry entry = (Entry)entries[j]; -// objectOutputStream.writeObject(entry.getKey()); -// objectOutputStream.writeObject(entry.getValue()); -// } -// } -// } -// } -// } - - // XXX 245014 -// private void readObject(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException -// { -// objectInputStream.defaultReadObject(); -// readEntries(objectInputStream); -// } - - // XXX 245014 -// protected void readEntries(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException -// { -// size = objectInputStream.readInt(); -// initializeDelegateEList(); -// -// // Restore the capacity, if there was any. -// // -// int capacity = objectInputStream.readInt(); -// if (capacity > 0) -// { -// entryData = newEntryData(capacity); -// -// // Read all size number of entryData. -// // -// for (int i = 0; i < size; ++i) -// { -// @SuppressWarnings("unchecked") K key = (K)objectInputStream.readObject(); -// @SuppressWarnings("unchecked") V value = (V)objectInputStream.readObject(); -// put(key, value); -// } -// } -// } - /** * Delegates to {@link #delegateEList}. */ diff --git a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap_CustomFieldSerializer.java b/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap_CustomFieldSerializer.java deleted file mode 100644 index 6dbb7cfb9..000000000 --- a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap_CustomFieldSerializer.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * - * - * Copyright (c) 2010 Ed Merks 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Ed Merks - Initial API and implementation - * - * - * - * $Id: BasicEMap_CustomFieldSerializer.java,v 1.1 2010/04/28 14:49:30 emerks Exp $ - */ -package org.eclipse.emf.common.util; - -import org.eclipse.emf.common.util.BasicEMap.Entry; - -import com.google.gwt.user.client.rpc.SerializationException; -import com.google.gwt.user.client.rpc.SerializationStreamReader; -import com.google.gwt.user.client.rpc.SerializationStreamWriter; - -public final class BasicEMap_CustomFieldSerializer -{ - @SuppressWarnings("unchecked") - public static void deserialize(SerializationStreamReader reader, BasicEMap eMap) throws SerializationException - { - reader.readObject(); - - eMap.size = reader.readInt(); - eMap.initializeDelegateEList(); - - // Restore the capacity, if there was any. - // - int capacity = reader.readInt(); - if (capacity > 0) - { - eMap.entryData = eMap.newEntryData(capacity); - - // Read all size number of entryData. - // - for (int i = 0; i < eMap.size; ++i) - { - eMap.put((K)reader.readObject(), (V)reader.readObject()); - } - } - } - - public static void serialize(SerializationStreamWriter writer, BasicEMap eMap) throws SerializationException - { - writer.writeObject(eMap); - - writer.writeInt(eMap.size); - if (eMap.entryData == null) - { - writer.writeInt(0); - } - else - { - // Write the capacity. - // - writer.writeInt(eMap.entryData.length); - - // Write all the entryData; there will be size of them. - // - for (int i = 0; i < eMap.entryData.length; ++i) - { - BasicEList> eList = eMap.entryData[i]; - if (eList != null) - { - Object [] entries = eList.data; - int size = eList.size; - for (int j = 0; j < size; ++j) - { - @SuppressWarnings("unchecked") - Entry entry = (Entry)entries[j]; - writer.writeObject(entry.getKey()); - writer.writeObject(entry.getValue()); - } - } - } - } - } -} -- cgit v1.2.3