summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-07 09:20:38 (EDT)
committerEike Stepper2007-08-07 09:20:38 (EDT)
commita34b9db5af4b6e6a71f9a1b919fe8b983ad9a7bd (patch)
tree8e452b036f2dbd5b13fb03ee647586b58a6e856d
parentb5ec586214c20f86200704e7ad1f865d7aa534fe (diff)
downloadcdo-a34b9db5af4b6e6a71f9a1b919fe8b983ad9a7bd.zip
cdo-a34b9db5af4b6e6a71f9a1b919fe8b983ad9a7bd.tar.gz
cdo-a34b9db5af4b6e6a71f9a1b919fe8b983ad9a7bd.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java13
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java55
2 files changed, 15 insertions, 53 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
index b0d14e2..aa30e3a 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
@@ -6,7 +6,6 @@
*/
package org.eclipse.emf.cdo.internal.ui.editor;
-import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOTransaction;
import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.internal.ui.SharedIcons;
@@ -61,6 +60,7 @@ import org.eclipse.emf.internal.cdo.CDOLegacyImpl;
import org.eclipse.emf.internal.cdo.CDOStateMachine;
import org.eclipse.emf.internal.cdo.CDOTransactionImpl;
import org.eclipse.emf.internal.cdo.InternalCDOObject;
+import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
@@ -1181,12 +1181,15 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
@Override
public String getColumnText(Object object, int columnIndex)
{
- if (object instanceof CDOObject)
+ try
{
- return super.getColumnText(object, columnIndex) + " [" + ((CDOObject)object).cdoID() + "]";
+ InternalCDOObject cdoObject = FSMUtil.adapt(object, view);
+ return super.getColumnText(object, columnIndex) + " [" + cdoObject.cdoID() + "]";
+ }
+ catch (RuntimeException ex)
+ {
+ return super.getColumnText(object, columnIndex);
}
-
- return super.getColumnText(object, columnIndex);
}
});
selectionViewer.setInput(viewerInput);
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
index 36b1d56..6b64595 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
@@ -21,6 +21,8 @@ import org.eclipse.net4j.tcp.ITCPConnector;
import org.eclipse.net4j.tcp.ITCPConstants;
import org.eclipse.net4j.tcp.ITCPSelector;
import org.eclipse.net4j.tcp.ITCPSelectorListener;
+import org.eclipse.net4j.util.io.IOUtil;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.internal.net4j.Channel;
import org.eclipse.internal.net4j.Connector;
@@ -325,56 +327,13 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
@Override
protected void doDeactivate() throws Exception
{
- Exception exception = null;
+ LifecycleUtil.deactivate(controlChannel);
+ controlChannel = null;
- try
- {
- controlChannel.deactivate();
- }
- catch (Exception ex)
- {
- if (exception == null)
- {
- exception = ex;
- }
- }
- finally
- {
- controlChannel = null;
- }
-
- try
- {
- socketChannel.close();
- }
- catch (Exception ex)
- {
- if (exception == null)
- {
- exception = ex;
- }
- }
- finally
- {
- socketChannel = null;
- }
-
- try
- {
- super.doDeactivate();
- }
- catch (Exception ex)
- {
- if (exception == null)
- {
- exception = ex;
- }
- }
+ IOUtil.closeSilent(socketChannel);
+ socketChannel = null;
- if (exception != null)
- {
- throw exception;
- }
+ super.doDeactivate();
}
private void checkSelectionKey()