summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-22 08:39:24 (EDT)
committerEike Stepper2007-07-22 08:39:24 (EDT)
commit1793889334b8cba607f426c808fd18ea2dd957f9 (patch)
treeb651f49d3b6c80a56d20e377f6edae2ff83e9fe3
parent35e08e42785e0204bafd44a68d599072bee3c63a (diff)
downloadcdo-1793889334b8cba607f426c808fd18ea2dd957f9.zip
cdo-1793889334b8cba607f426c808fd18ea2dd957f9.tar.gz
cdo-1793889334b8cba607f426c808fd18ea2dd957f9.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenHistoricalViewAction.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOAudit.java1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java42
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java3
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/trace/RemoteTraceServer.java17
12 files changed, 43 insertions, 97 deletions
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
index d600e37..c405885 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
@@ -217,8 +217,7 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory
*/
public void dispose()
{
- if (cdoResourceItemProvider != null)
- cdoResourceItemProvider.dispose();
+ if (cdoResourceItemProvider != null) cdoResourceItemProvider.dispose();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
index ead0e6a..86b17ea 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
@@ -153,8 +153,7 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
*/
public static Model1Package init()
{
- if (isInited)
- return (Model1Package)EPackage.Registry.INSTANCE.getEPackage(Model1Package.eNS_URI);
+ if (isInited) return (Model1Package)EPackage.Registry.INSTANCE.getEPackage(Model1Package.eNS_URI);
// Obtain or create and register package
Model1PackageImpl theModel1Package = (Model1PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Model1PackageImpl ? EPackage.Registry.INSTANCE
@@ -531,8 +530,7 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
*/
public void createPackageContents()
{
- if (isCreated)
- return;
+ if (isCreated) return;
isCreated = true;
// Create classes and their features
@@ -596,8 +594,7 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
*/
public void initializePackageContents()
{
- if (isInitialized)
- return;
+ if (isInitialized) return;
isInitialized = true;
// Initialize package
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
index 0ba62a9..e461176 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
@@ -110,90 +110,75 @@ public class Model1Switch<T>
{
Address address = (Address)theEObject;
T result = caseAddress(address);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.COMPANY:
{
Company company = (Company)theEObject;
T result = caseCompany(company);
- if (result == null)
- result = caseAddress(company);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = caseAddress(company);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.SUPPLIER:
{
Supplier supplier = (Supplier)theEObject;
T result = caseSupplier(supplier);
- if (result == null)
- result = caseAddress(supplier);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = caseAddress(supplier);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.CUSTOMER:
{
Customer customer = (Customer)theEObject;
T result = caseCustomer(customer);
- if (result == null)
- result = caseAddress(customer);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = caseAddress(customer);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.ORDER:
{
Order order = (Order)theEObject;
T result = caseOrder(order);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.ORDER_DETAIL:
{
OrderDetail orderDetail = (OrderDetail)theEObject;
T result = caseOrderDetail(orderDetail);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.PURCHASE_ORDER:
{
PurchaseOrder purchaseOrder = (PurchaseOrder)theEObject;
T result = casePurchaseOrder(purchaseOrder);
- if (result == null)
- result = caseOrder(purchaseOrder);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = caseOrder(purchaseOrder);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.SALES_ORDER:
{
SalesOrder salesOrder = (SalesOrder)theEObject;
T result = caseSalesOrder(salesOrder);
- if (result == null)
- result = caseOrder(salesOrder);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = caseOrder(salesOrder);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.CATEGORY:
{
Category category = (Category)theEObject;
T result = caseCategory(category);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
case Model1Package.PRODUCT:
{
Product product = (Product)theEObject;
T result = caseProduct(product);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
default:
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
index ed4b2ed..360e70e 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
@@ -23,8 +23,8 @@ public final class LoadResourceAction extends ViewAction
protected void preRun(IWorkbenchPage page) throws Exception
{
String uri = ViewAction.lastResourceNumber == 0 ? "" : "/res" + ViewAction.lastResourceNumber;
- InputDialog dialog = new InputDialog(page.getWorkbenchWindow().getShell(), "Load Resource",
- "Enter resource path:", uri, null);
+ InputDialog dialog = new InputDialog(page.getWorkbenchWindow().getShell(), "Load Resource", "Enter resource path:",
+ uri, null);
if (dialog.open() == InputDialog.OK)
{
resourcePath = dialog.getValue();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenHistoricalViewAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenHistoricalViewAction.java
index 43dc4cd..3a2420a 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenHistoricalViewAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenHistoricalViewAction.java
@@ -16,7 +16,8 @@ public final class OpenHistoricalViewAction extends SessionAction
{
public OpenHistoricalViewAction(IWorkbenchPage page, CDOSession session)
{
- super(page, "Open Historical View", "Open a historical CDO view", SharedIcons.getDescriptor(SharedIcons.ETOOL_OPEN_EDITOR), session);
+ super(page, "Open Historical View", "Open a historical CDO view", SharedIcons
+ .getDescriptor(SharedIcons.ETOOL_OPEN_EDITOR), session);
}
@Override
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 1634c57..80e9cce 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
@@ -32,7 +32,6 @@ import org.eclipse.net4j.ui.views.IElementFilter;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
-
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.resource.ImageDescriptor;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOAudit.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOAudit.java
index fccc704..ad9ba33 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOAudit.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOAudit.java
@@ -10,7 +10,6 @@
**************************************************************************/
package org.eclipse.emf.cdo;
-
/**
* @author Eike Stepper
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
index 706b6e2..5064e20 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
@@ -106,8 +106,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
*/
public static EresourcePackage init()
{
- if (isInited)
- return (EresourcePackage)EPackage.Registry.INSTANCE.getEPackage(EresourcePackage.eNS_URI);
+ if (isInited) return (EresourcePackage)EPackage.Registry.INSTANCE.getEPackage(EresourcePackage.eNS_URI);
// Obtain or create and register package
EresourcePackageImpl theEresourcePackage = (EresourcePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EresourcePackageImpl ? EPackage.Registry.INSTANCE
@@ -287,8 +286,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
*/
public void createPackageContents()
{
- if (isCreated)
- return;
+ if (isCreated) return;
isCreated = true;
// Create classes and their features
@@ -325,8 +323,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
*/
public void initializePackageContents()
{
- if (isInitialized)
- return;
+ if (isInitialized) return;
isInitialized = true;
// Initialize package
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
index 83ceae1..e9e555e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
@@ -101,8 +101,7 @@ public class EresourceSwitch<T>
{
CDOResource cdoResource = (CDOResource)theEObject;
T result = caseCDOResource(cdoResource);
- if (result == null)
- result = defaultCase(theEObject);
+ if (result == null) result = defaultCase(theEObject);
return result;
}
default:
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 2196020..f87e965 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
@@ -115,24 +115,16 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
public void attach(InternalCDOObject object, CDOResource resource, CDOViewImpl view)
{
- if (TRACER.isEnabled())
- {
- TRACER.format("ATTACH: {0} --> {1}", object, view);
- }
-
ResourceAndView data = new ResourceAndView();
data.resource = resource;
data.view = view;
// TRANSIENT --> PREPARED_ATTACH
+ if (TRACER.isEnabled()) TRACER.format("ATTACH: {0} --> {1}", object, view);
process(object, CDOEvent.ATTACH, data);
- if (TRACER.isEnabled())
- {
- TRACER.format("FINALIZE_ATTACH: {0} --> {1}", object, view);
- }
-
// PREPARED_ATTACH --> NEW
+ if (TRACER.isEnabled()) TRACER.format("FINALIZE_ATTACH: {0} --> {1}", object, view);
process(object, CDOEvent.FINALIZE_ATTACH, data);
}
@@ -144,51 +136,31 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
public void read(InternalCDOObject object)
{
- if (TRACER.isEnabled())
- {
- TRACER.format("READ: {0}", object);
- }
-
+ if (TRACER.isEnabled()) TRACER.format("READ: {0}", object);
process(object, CDOEvent.READ, null);
}
public void write(InternalCDOObject object)
{
- if (TRACER.isEnabled())
- {
- TRACER.format("WRITE: {0}", object);
- }
-
+ if (TRACER.isEnabled()) TRACER.format("WRITE: {0}", object);
process(object, CDOEvent.WRITE, null);
}
public void invalidate(InternalCDOObject object, long timeStamp)
{
- if (TRACER.isEnabled())
- {
- TRACER.format("INVALIDATE: {0}", object);
- }
-
+ if (TRACER.isEnabled()) TRACER.format("INVALIDATE: {0}", object);
process(object, CDOEvent.INVALIDATE, timeStamp);
}
public void commit(InternalCDOObject object, CommitTransactionResult result)
{
- if (TRACER.isEnabled())
- {
- TRACER.format("COMMIT: {0}", object);
- }
-
+ if (TRACER.isEnabled()) TRACER.format("COMMIT: {0}", object);
process(object, CDOEvent.COMMIT, result);
}
public void rollback(InternalCDOObject object)
{
- if (TRACER.isEnabled())
- {
- TRACER.format("ROLLBACK: {0}", object);
- }
-
+ if (TRACER.isEnabled()) TRACER.format("ROLLBACK: {0}", object);
process(object, CDOEvent.ROLLBACK, null);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java
index 7eba0fe..bed252d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java
@@ -57,8 +57,7 @@ public final class GenUtil
}
}
- if (name.length() != 0)
- parsedName.addAll(parseName(name, '_'));
+ if (name.length() != 0) parsedName.addAll(parseName(name, '_'));
StringBuilder result = new StringBuilder();
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/trace/RemoteTraceServer.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/trace/RemoteTraceServer.java
index e506e99..a79d1e3 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/trace/RemoteTraceServer.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/trace/RemoteTraceServer.java
@@ -367,15 +367,14 @@ public class RemoteTraceServer
}
StackTraceElement[] stackTrace = event.getStackTrace();
- if (stackTrace != null)
- for (StackTraceElement element : stackTrace)
- {
- stream.print(element.getClassName());
- stream.print("." + element.getMethodName());
- stream.print("(" + element.getFileName());
- stream.print(":" + element.getLineNumber());
- stream.println(")");
- }
+ if (stackTrace != null) for (StackTraceElement element : stackTrace)
+ {
+ stream.print(element.getClassName());
+ stream.print("." + element.getMethodName());
+ stream.print("(" + element.getFileName());
+ stream.print(":" + element.getLineNumber());
+ stream.println(")");
+ }
stream.println();
}