summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-27 01:46:16 (EDT)
committerEike Stepper2007-07-27 01:46:16 (EDT)
commit8f5dcf6bce64590e920fb6c1eb4e796458e7130c (patch)
tree751d004e6266e18c1769fc4972efeb9d1b56e4dc
parent84ead4a21a927407fd3d7f02d9d943f74b0e5e21 (diff)
downloadcdo-8f5dcf6bce64590e920fb6c1eb4e796458e7130c.zip
cdo-8f5dcf6bce64590e920fb6c1eb4e796458e7130c.tar.gz
cdo-8f5dcf6bce64590e920fb6c1eb4e796458e7130c.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractOpenViewAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java22
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java2
3 files changed, 2 insertions, 26 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractOpenViewAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractOpenViewAction.java
index 9203ad8..5b853c8 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractOpenViewAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractOpenViewAction.java
@@ -10,8 +10,6 @@ import org.eclipse.ui.IWorkbenchPage;
*/
public abstract class AbstractOpenViewAction extends SessionAction
{
- private static final int NUMBER_OF_SYSTEM_PACKAGES = 2;
-
public AbstractOpenViewAction(IWorkbenchPage page, String text, String toolTipText, ImageDescriptor image,
CDOSession session)
{
@@ -21,6 +19,6 @@ public abstract class AbstractOpenViewAction extends SessionAction
@Override
public boolean isEnabled()
{
- return getSession().getPackageRegistry().size() > NUMBER_OF_SYSTEM_PACKAGES && super.isEnabled();
+ return !getSession().getPackageRegistry().isEmpty() && super.isEnabled();
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java
index 37e3d57..9bb9075 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java
@@ -297,28 +297,6 @@ public class CDOItemProvider extends ContainerItemProvider
{
}
- // @Override
- // protected Display getDisplay()
- // {
- // Display display = getViewer().getControl().getDisplay();
- // if (display == null)
- // {
- // display = Display.getCurrent();
- // }
- //
- // if (display == null)
- // {
- // display = Display.getDefault();
- // }
- //
- // if (display == null)
- // {
- // throw new IllegalStateException("display == null");
- // }
- //
- // return display;
- // }
-
@Override
protected void elementAdded(Object element, Object parent)
{
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 fb0dcc9..de7c1fb 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
@@ -282,7 +282,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
{
if (super.removeChannel(channel, actively))
{
- if (isConnected() && actively)
+ if (controlChannel != null && channel != null && isConnected() && actively)
{
controlChannel.deregisterChannel(channel.getChannelIndex());
}