From 7f19a7492f6f8d6878512a2f9a0cc3fbfe97d90a Mon Sep 17 00:00:00 2001 From: Eike Stepper Date: Tue, 5 May 2009 11:11:28 +0000 Subject: formatting --- .../emf/cdo/eresource/impl/CDOResourceImpl.java | 1 + .../org/eclipse/emf/cdo/session/CDOSession.java | 1 - .../eclipse/emf/internal/cdo/CDOObjectImpl.java | 3 ++- .../eclipse/emf/internal/cdo/CDOObjectMerger.java | 3 ++- .../eclipse/emf/internal/cdo/CDOStateMachine.java | 3 ++- .../src/org/eclipse/emf/internal/cdo/CDOStore.java | 1 + .../cdo/analyzer/CDOAnalyzerFeatureInfo.java | 3 +-- .../internal/cdo/net4j/CDONet4jSessionFactory.java | 3 +-- .../protocol/CommitTransactionPhase2Request.java | 3 ++- .../cdo/net4j/protocol/LoadChunkRequest.java | 3 ++- .../revision/CDOListWithElementProxiesImpl.java | 3 +-- .../emf/internal/cdo/session/CDOSessionImpl.java | 1 - .../internal/cdo/transaction/CDOSavepointImpl.java | 23 +++++++++++----------- .../cdo/transaction/CDOXATransactionImpl.java | 5 ++++- .../internal/cdo/util/CompletePackageClosure.java | 5 ++--- .../org/eclipse/emf/internal/cdo/util/FSMUtil.java | 3 ++- .../emf/internal/cdo/util/PackageClosure.java | 3 ++- .../emf/internal/cdo/util/RevisionAdjuster.java | 3 +-- .../eclipse/emf/internal/cdo/view/CDOViewImpl.java | 2 +- 19 files changed, 38 insertions(+), 34 deletions(-) (limited to 'plugins/org.eclipse.emf.cdo/src') diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java index 2dfe1b4829..0e14d950d4 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java @@ -170,6 +170,7 @@ public class CDOResourceImpl extends CDOResourceNodeImpl implements CDOResource, { return this; } + return super.eDirectResource(); } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java index 2675b583e5..afd6649c9b 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/CDOSession.java @@ -163,7 +163,6 @@ public interface CDOSession extends CDOCommonSession, IContainer, IOpti */ public interface Options extends CDOCommonSession.Options { - public boolean isGeneratedPackageEmulationEnabled(); public void setGeneratedPackageEmulationEnabled(boolean generatedPackageEmulationEnabled); diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java index 9678af3194..48802aff07 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java @@ -4,7 +4,7 @@ * 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: * Eike Stepper - initial API and implementation * Simon McDuff - maintenance @@ -973,6 +973,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec { oldContainerResource.attached(this); } + // If we didn't detach it from an old resource already, detach it from the old container's resource. // else if (oldResource == null) diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectMerger.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectMerger.java index bd8740168e..69c1e3ea10 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectMerger.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectMerger.java @@ -4,7 +4,7 @@ * 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: * Simon McDuff - initial API and implementation * Eike Stepper - maintenance @@ -37,6 +37,7 @@ public class CDOObjectMerger extends CDORevisionMerger { revision.setTransactional(); } + object.cdoInternalSetRevision(revision); // NEW object should stay that state. diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java index 1b7272155c..93ba1c212a 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java @@ -4,7 +4,7 @@ * 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: * Eike Stepper - initial API and implementation * Simon McDuff - maintenance @@ -368,6 +368,7 @@ public final class CDOStateMachine extends FiniteStateMachine {1}", tempID.toURIFragment(), newIDExternal.toURIFragment()); //$NON-NLS-1$ } + out.writeCDOID(tempID); out.writeCDOID(newIDExternal); diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/LoadChunkRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/LoadChunkRequest.java index 4e293822b9..2fcd505651 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/LoadChunkRequest.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/LoadChunkRequest.java @@ -4,7 +4,7 @@ * 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: * Eike Stepper - initial API and implementation **************************************************************************/ @@ -91,6 +91,7 @@ public class LoadChunkRequest extends CDOClientRequest { TRACER.format("Writing fromIndex: {0}", fromIndex); //$NON-NLS-1$ } + int diffIndex = accessIndex - fetchIndex; out.writeInt(fromIndex - diffIndex); if (TRACER.isEnabled()) diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOListWithElementProxiesImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOListWithElementProxiesImpl.java index 5456bbf85a..79557ca22a 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOListWithElementProxiesImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOListWithElementProxiesImpl.java @@ -4,7 +4,7 @@ * 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: * Simon McDuff - initial API and implementation * Eike Stepper - maintenance @@ -27,7 +27,6 @@ import org.eclipse.emf.spi.cdo.CDOElementProxy; */ public class CDOListWithElementProxiesImpl extends CDOListImpl { - public static final CDOListFactory FACTORY = new CDOListFactory() { public CDOList createList(int initialCapacity, int size, int initialChunk) diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java index 176dacb19c..7fbc8859e2 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java @@ -688,7 +688,6 @@ public abstract class CDOSessionImpl extends Container implements Inter Set neededLibraries = createSet(libraryDescriptor.getLibraryNames()); if (!neededLibraries.isEmpty()) { - IOUtil.mkdirs(cacheFolder); Set existingLibraries = createSet(cacheFolder.list()); Set missingLibraries = new HashSet(neededLibraries); diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java index c4822d7068..3460edf310 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java @@ -1,14 +1,14 @@ -/** - * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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: - * Simon McDuff - initial API and implementation - * Eike Stepper - maintenance - * Simon McDuff - http://bugs.eclipse.org/204890 +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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: + * Simon McDuff - initial API and implementation + * Eike Stepper - maintenance + * Simon McDuff - http://bugs.eclipse.org/204890 */ package org.eclipse.emf.internal.cdo.transaction; @@ -280,7 +280,6 @@ public class CDOSavepointImpl extends AbstractSavepoint } else { - for (CDOFeatureDelta delta : entry.getValue().getFeatureDeltas()) { revisionDelta.addFeatureDelta(((InternalCDOFeatureDelta)delta).copy()); diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java index e27c4189ca..8d4a2cf4af 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java @@ -4,7 +4,7 @@ * 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: * Simon McDuff - initial API and implementation * Eike Stepper - maintenance @@ -528,6 +528,7 @@ public class CDOXATransactionImpl implements InternalCDOXATransaction CommitTransactionResult result = sessionProtocol.commitTransactionPhase3(xaContext, monitor); check_result(result); } + xaContext.postCommit(xaContext.getResult()); xaContext.setState(null); } @@ -587,6 +588,7 @@ public class CDOXATransactionImpl implements InternalCDOXATransaction { CDOXATransactionImpl.this.add((InternalCDOTransaction)notification.getNewValue()); } + break; case Notification.REMOVE: @@ -594,6 +596,7 @@ public class CDOXATransactionImpl implements InternalCDOXATransaction { CDOXATransactionImpl.this.remove((InternalCDOTransaction)notification.getNewValue()); } + break; } } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CompletePackageClosure.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CompletePackageClosure.java index 07123f48cd..5cd1a14434 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CompletePackageClosure.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CompletePackageClosure.java @@ -4,10 +4,10 @@ * 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: * Eike Stepper - initial API and implementation - * Simon McDuff - http://bugs.eclipse.org/246442 + * Simon McDuff - http://bugs.eclipse.org/246442 */ package org.eclipse.emf.internal.cdo.util; @@ -54,7 +54,6 @@ public class CompletePackageClosure extends PackageClosure @Override protected void collectContents(EPackage ePackage, Set visited) { - if (ePackage != null && visited.add(ePackage)) { if (excludeEcore && // Optimize EPackage comparison diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java index cea170ccb0..18df3f6163 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java @@ -4,7 +4,7 @@ * 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: * Eike Stepper - initial API and implementation * Simon McDuff - http://bugs.eclipse.org/246705 @@ -237,6 +237,7 @@ public final class FSMUtil } } } + return false; } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/PackageClosure.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/PackageClosure.java index a5acf0dbe2..23640469fa 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/PackageClosure.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/PackageClosure.java @@ -4,7 +4,7 @@ * 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: * Eike Stepper - initial API and implementation * Simon McDuff - maintenance @@ -61,6 +61,7 @@ public abstract class PackageClosure implements IPackageClosure { TRACER.trace("Package closure for " + ePackage.getNsURI()); //$NON-NLS-1$ } + collectContents(ePackage, visited); for (EPackage subPackage : ePackage.getESubpackages()) { diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/RevisionAdjuster.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/RevisionAdjuster.java index 0b623e3df2..a9d1cd18ef 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/RevisionAdjuster.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/RevisionAdjuster.java @@ -4,12 +4,11 @@ * 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: * Simon McDuff - initial API and implementation * Eike Stepper - maintenance */ - package org.eclipse.emf.internal.cdo.util; import org.eclipse.emf.cdo.common.id.CDOID; diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java index 20a65bfbb7..823de330a9 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java @@ -1110,6 +1110,7 @@ public class CDOViewImpl extends Lifecycle implements InternalCDOView { dirtyObject = objects.get(dirtyOID.getID()); } + if (dirtyObject != null) { CDOStateMachine.INSTANCE.invalidate(dirtyObject, dirtyOID.getVersion()); @@ -1804,7 +1805,6 @@ public class CDOViewImpl extends Lifecycle implements InternalCDOView class SubscribeEntry { - private CDOID id; private int count = 0; -- cgit v1.2.3