Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschnekenbu2009-12-04 19:11:15 +0000
committerrschnekenbu2009-12-04 19:11:15 +0000
commit55534303c3e74fa7a4100692cee55485ecccb57d (patch)
treed010ead95297e8645c5a9615e780b8b269ee0ffa /plugins/profile-tool
parent1c532b58a4d8e08cc216b8a57070effb600545b6 (diff)
downloadorg.eclipse.papyrus-55534303c3e74fa7a4100692cee55485ecccb57d.tar.gz
org.eclipse.papyrus-55534303c3e74fa7a4100692cee55485ecccb57d.tar.xz
org.eclipse.papyrus-55534303c3e74fa7a4100692cee55485ecccb57d.zip
Applied the new Formatter on papyrus code
Diffstat (limited to 'plugins/profile-tool')
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java10
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java4
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java14
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java26
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/Activator.java2
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/GenModelUpdater.java54
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/exceptions/URINotValidException.java2
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/popup/actions/UpdateGenModelAction.java18
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java5
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java2
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java2
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java8
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java2
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java10
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java16
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java29
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java21
-rw-r--r--plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java28
18 files changed, 122 insertions, 131 deletions
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java b/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java
index a9105fc67be..03d8e89fc51 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEObjectItemProvider.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.provider;
import java.util.Collection;
@@ -28,8 +28,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.resource.ResourceEObject}
- * object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.resource.ResourceEObject} object. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -54,7 +53,7 @@ public class ResourceEObjectItemProvider extends ItemProviderAdapter implements
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
+ if(itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
@@ -84,8 +83,7 @@ public class ResourceEObjectItemProvider extends ItemProviderAdapter implements
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}
- * . <!-- begin-user-doc --> <!-- end-user-doc -->
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged} . <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java b/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java
index 73e2ce9c3dd..c55f052be48 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceEditPlugin.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.provider;
import org.eclipse.emf.common.EMFPlugin;
@@ -44,7 +44,7 @@ public final class ResourceEditPlugin extends EMFPlugin {
* @generated
*/
public ResourceEditPlugin() {
- super(new ResourceLocator[] {});
+ super(new ResourceLocator[]{});
}
/**
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java b/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java
index c9b617173a2..1538a28c520 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProvider.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.provider;
import java.util.Collection;
@@ -59,7 +59,7 @@ public class ResourceItemProvider extends ItemProviderAdapter implements IEditin
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
+ if(itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
@@ -68,8 +68,7 @@ public class ResourceItemProvider extends ItemProviderAdapter implements IEditin
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate
- * feature for an {@link org.eclipse.emf.edit.command.AddCommand},
- * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -77,7 +76,7 @@ public class ResourceItemProvider extends ItemProviderAdapter implements IEditin
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
+ if(childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(ResourcePackage.Literals.RESOURCE__EOBJECTS);
}
@@ -120,8 +119,7 @@ public class ResourceItemProvider extends ItemProviderAdapter implements IEditin
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}
- * . <!-- begin-user-doc --> <!-- end-user-doc -->
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged} . <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -129,7 +127,7 @@ public class ResourceItemProvider extends ItemProviderAdapter implements IEditin
public void notifyChanged(Notification notification) {
updateChildren(notification);
- switch (notification.getFeatureID(Resource.class)) {
+ switch(notification.getFeatureID(Resource.class)) {
case ResourcePackage.RESOURCE__EOBJECTS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java b/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java
index bf3d112dc65..914240963be 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource.edit/src/org/eclipse/papyrus/resource/provider/ResourceItemProviderAdapterFactory.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.provider;
import java.util.ArrayList;
@@ -34,8 +34,8 @@ import org.eclipse.papyrus.resource.util.ResourceAdapterFactory;
/**
* This is the factory that is used to provide the interfaces needed to support Viewers. The
- * adapters generated by this factory convert EMF adapter notifications into calls to
- * {@link #fireNotifyChanged fireNotifyChanged}. The adapters also support Eclipse property sheets.
+ * adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The adapters also
+ * support Eclipse property sheets.
* Note that most of the adapters are shared among multiple instances. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
@@ -82,8 +82,7 @@ public class ResourceItemProviderAdapterFactory extends ResourceAdapterFactory i
}
/**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.papyrus.resource.Resource} instances. <!-- begin-user-doc --> <!--
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.resource.Resource} instances. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
@@ -98,7 +97,7 @@ public class ResourceItemProviderAdapterFactory extends ResourceAdapterFactory i
*/
@Override
public Adapter createResourceAdapter() {
- if (resourceItemProvider == null) {
+ if(resourceItemProvider == null) {
resourceItemProvider = new ResourceItemProvider(this);
}
@@ -106,8 +105,7 @@ public class ResourceItemProviderAdapterFactory extends ResourceAdapterFactory i
}
/**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.papyrus.resource.ResourceEObject} instances. <!-- begin-user-doc --> <!--
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.resource.ResourceEObject} instances. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
@@ -122,7 +120,7 @@ public class ResourceItemProviderAdapterFactory extends ResourceAdapterFactory i
*/
@Override
public Adapter createResourceEObjectAdapter() {
- if (resourceEObjectItemProvider == null) {
+ if(resourceEObjectItemProvider == null) {
resourceEObjectItemProvider = new ResourceEObjectItemProvider(this);
}
@@ -177,9 +175,9 @@ public class ResourceItemProviderAdapterFactory extends ResourceAdapterFactory i
*/
@Override
public Object adapt(Object object, Object type) {
- if (isFactoryForType(type)) {
+ if(isFactoryForType(type)) {
Object adapter = super.adapt(object, type);
- if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ if(!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
return adapter;
}
}
@@ -214,7 +212,7 @@ public class ResourceItemProviderAdapterFactory extends ResourceAdapterFactory i
public void fireNotifyChanged(Notification notification) {
changeNotifier.fireNotifyChanged(notification);
- if (parentAdapterFactory != null) {
+ if(parentAdapterFactory != null) {
parentAdapterFactory.fireNotifyChanged(notification);
}
}
@@ -226,9 +224,9 @@ public class ResourceItemProviderAdapterFactory extends ResourceAdapterFactory i
* @generated
*/
public void dispose() {
- if (resourceItemProvider != null)
+ if(resourceItemProvider != null)
resourceItemProvider.dispose();
- if (resourceEObjectItemProvider != null)
+ if(resourceEObjectItemProvider != null)
resourceEObjectItemProvider.dispose();
}
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/Activator.java b/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/Activator.java
index c4327ea92c5..91474a3ff88 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/Activator.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/Activator.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.migration;
import org.eclipse.ui.plugin.AbstractUIPlugin;
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/GenModelUpdater.java b/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/GenModelUpdater.java
index 4770253cbd6..410c8c93d55 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/GenModelUpdater.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/GenModelUpdater.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.migration.controller;
import java.io.IOException;
@@ -74,18 +74,18 @@ public class GenModelUpdater {
* @throws IOException
*/
public void transform(URI uri) throws URINotValidException, IOException {
- if (uri == null) {
+ if(uri == null) {
throw new URINotValidException("uri is null");
}
ResourceSet set = new ResourceSetImpl();
try {
Resource resource = set.getResource(uri, true);
- if (resource != null) {
+ if(resource != null) {
EObject e = resource.getContents().get(0);
- if (e instanceof GenModel) {
- GenModel genmodel = (GenModel) e;
+ if(e instanceof GenModel) {
+ GenModel genmodel = (GenModel)e;
Resource toSave = update(genmodel);
- if (toSave != null) {
+ if(toSave != null) {
resource.save(Collections.EMPTY_MAP);
toSave.save(Collections.EMPTY_MAP);
}
@@ -94,8 +94,8 @@ public class GenModelUpdater {
}
}
// we have to unload the resource to free the memory
- for (Resource r : set.getResources()) {
- if (r.isLoaded()) {
+ for(Resource r : set.getResources()) {
+ if(r.isLoaded()) {
try {
r.unload();
} catch (Exception e) {
@@ -118,28 +118,28 @@ public class GenModelUpdater {
// does the genmodel already contain the resource ?
Resource result = null;
boolean found = false;
- for (GenPackage p : genmodel.getUsedGenPackages()) {
+ for(GenPackage p : genmodel.getUsedGenPackages()) {
found |= resourcePackage.equals(p.getEcorePackage());
}
- if (!found) {
+ if(!found) {
// we load the Resource GenModel
Resource resourceForResourceGenmodel = genmodel.eResource().getResourceSet().getResource(
uriForResourceGenModel, true);
- if (resourceForResourceGenmodel != null) {
+ if(resourceForResourceGenmodel != null) {
EObject root = resourceForResourceGenmodel.getContents().get(0);
- if (root instanceof GenModel) {
- GenModel model = (GenModel) root;
+ if(root instanceof GenModel) {
+ GenModel model = (GenModel)root;
// Resource Genmodel is a used gen package for the current genmodel
genmodel.getUsedGenPackages().add(model.getGenPackages().get(0));
// load the eclass resource eobject
Resource resourceResource = genmodel.eResource().getResourceSet().getResource(
uriForEclassResourceEObject.trimFragment(), true);
- if (resourceResource != null) {
+ if(resourceResource != null) {
// we get the ResourceEObject EClass
EObject resourceEObjectEobject = resourceResource.getEObject(uriForEclassResourceEObject
.fragment());
- if (resourceEObjectEobject instanceof EClass) {
- resourceEObjectEClass = (EClass) resourceEObjectEobject;
+ if(resourceEObjectEobject instanceof EClass) {
+ resourceEObjectEClass = (EClass)resourceEObjectEobject;
result = addResourceEobjectInheritance(genmodel);
}
}
@@ -160,7 +160,7 @@ public class GenModelUpdater {
EcoreUtil.resolveAll(genmodel.eResource().getResourceSet());
Resource result = null;
List<GenPackage> packages = genmodel.getGenPackages();
- if (packages.size() > 0) {
+ if(packages.size() > 0) {
GenPackage genPackage = packages.get(0);
currentEPackage = genPackage.getEcorePackage();
result = currentEPackage.eResource();
@@ -175,13 +175,13 @@ public class GenModelUpdater {
* @param currentEPackage2
*/
private void manageEPackage(EPackage currentEPackage2) {
- for (EClassifier eclassifier : currentEPackage2.getEClassifiers()) {
- if (eclassifier instanceof EClass) {
- EClass eClass = (EClass) eclassifier;
+ for(EClassifier eclassifier : currentEPackage2.getEClassifiers()) {
+ if(eclassifier instanceof EClass) {
+ EClass eClass = (EClass)eclassifier;
manageEClass(eClass);
}
}
- for (EPackage ePackage : currentEPackage2.getESubpackages()) {
+ for(EPackage ePackage : currentEPackage2.getESubpackages()) {
manageEPackage(ePackage);
}
@@ -193,18 +193,18 @@ public class GenModelUpdater {
* @param eClass
*/
private void manageEClass(EClass eClass) {
- if (eClass != resourceEObjectEClass) {
- if (eClass.getESuperTypes().size() == 0) {
- if (isACorrectEPackage(eClass.getEPackage())) {
+ if(eClass != resourceEObjectEClass) {
+ if(eClass.getESuperTypes().size() == 0) {
+ if(isACorrectEPackage(eClass.getEPackage())) {
eClass.getESuperTypes().add(resourceEObjectEClass);
}
} else {
boolean toAdd = true;
- for (EClass eClass2 : eClass.getESuperTypes()) {
+ for(EClass eClass2 : eClass.getESuperTypes()) {
toAdd &= !isACorrectEPackage(eClass2.getEPackage());
manageEClass(eClass2);
}
- if (toAdd) {
+ if(toAdd) {
eClass.getESuperTypes().add(resourceEObjectEClass);
}
}
@@ -219,7 +219,7 @@ public class GenModelUpdater {
*/
private boolean isACorrectEPackage(EPackage ePackage) {
EPackage current = ePackage;
- while (current != null && current != currentEPackage) {
+ while(current != null && current != currentEPackage) {
current = current.getESuperPackage();
}
return current == currentEPackage;
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/exceptions/URINotValidException.java b/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/exceptions/URINotValidException.java
index c12f614f686..b94b9a5c2e6 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/exceptions/URINotValidException.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/controller/exceptions/URINotValidException.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.migration.controller.exceptions;
/**
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/popup/actions/UpdateGenModelAction.java b/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/popup/actions/UpdateGenModelAction.java
index 0d082bac971..312ad4652bd 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/popup/actions/UpdateGenModelAction.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource.migration/src/org/eclipse/papyrus/resource/migration/popup/actions/UpdateGenModelAction.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.migration.popup.actions;
import java.io.IOException;
@@ -59,15 +59,15 @@ public class UpdateGenModelAction implements IObjectActionDelegate {
* @see IActionDelegate#run(IAction)
*/
public void run(IAction action) {
- if (PlatformUI.getWorkbench() != null) {
+ if(PlatformUI.getWorkbench() != null) {
IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench.getActiveWorkbenchWindow() != null) {
+ if(workbench.getActiveWorkbenchWindow() != null) {
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window.getSelectionService() != null) {
+ if(window.getSelectionService() != null) {
ISelectionService service = window.getSelectionService();
ISelection selection = service.getSelection();
- if (selection instanceof IStructuredSelection) {
- final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ if(selection instanceof IStructuredSelection) {
+ final IStructuredSelection structuredSelection = (IStructuredSelection)selection;
BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
public void run() {
@@ -89,10 +89,10 @@ public class UpdateGenModelAction implements IObjectActionDelegate {
try {
Iterator<?> iterator = structuredSelection.iterator();
GenModelUpdater updater = new GenModelUpdater();
- while (iterator.hasNext()) {
+ while(iterator.hasNext()) {
Object next = iterator.next();
- if (next instanceof IFile) {
- IFile ifile = (IFile) next;
+ if(next instanceof IFile) {
+ IFile ifile = (IFile)next;
updater.transform(URI.createURI(ifile.getLocationURI().toString()));
ifile.getParent().refreshLocal(IResource.DEPTH_ONE, new NullProgressMonitor());
}
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java
index 8e4b23c31c1..feab5a78b1a 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/Resource.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource;
import org.eclipse.emf.common.util.EList;
@@ -37,8 +37,7 @@ public interface Resource extends EObject {
* Returns the value of the '<em><b>Eobjects</b></em>' containment reference list. The list
* contents are of type {@link org.eclipse.emf.ecore.EObject}. <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Eobjects</em>' containment reference list isn't clear, there
- * really should be more of a description here...
+ * If the meaning of the '<em>Eobjects</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
*
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java
index cb3c4629fca..37dcb22eef5 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceEObject.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource;
import org.eclipse.emf.ecore.EObject;
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java
index 079855157f7..d77a920663e 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourceFactory.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource;
import org.eclipse.emf.ecore.EFactory;
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java
index cb498632396..b734f6546ad 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/ResourcePackage.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource;
import org.eclipse.emf.ecore.EClass;
@@ -121,8 +121,7 @@ public interface ResourcePackage extends EPackage {
EClass getResource();
/**
- * Returns the meta object for the containment reference list '
- * {@link org.eclipse.papyrus.resource.Resource#getEobjects <em>Eobjects</em>}'. <!--
+ * Returns the meta object for the containment reference list ' {@link org.eclipse.papyrus.resource.Resource#getEobjects <em>Eobjects</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @return the meta object for the containment reference list '<em>Eobjects</em>'.
@@ -184,8 +183,7 @@ public interface ResourcePackage extends EPackage {
EReference RESOURCE__EOBJECTS = eINSTANCE.getResource_Eobjects();
/**
- * The meta object literal for the '
- * {@link org.eclipse.papyrus.resource.impl.ResourceEObjectImpl <em>EObject</em>}' class.
+ * The meta object literal for the ' {@link org.eclipse.papyrus.resource.impl.ResourceEObjectImpl <em>EObject</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see org.eclipse.papyrus.resource.impl.ResourceEObjectImpl
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java
index ceeeb778c2a..c8bbc2e8939 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceEObjectImpl.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.impl;
import org.eclipse.emf.ecore.EClass;
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java
index 471ca723c9e..960ea2f8cd0 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceFactoryImpl.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.impl;
import org.eclipse.emf.ecore.EClass;
@@ -37,9 +37,9 @@ public class ResourceFactoryImpl extends EFactoryImpl implements ResourceFactory
*/
public static ResourceFactory init() {
try {
- ResourceFactory theResourceFactory = (ResourceFactory) EPackage.Registry.INSTANCE
+ ResourceFactory theResourceFactory = (ResourceFactory)EPackage.Registry.INSTANCE
.getEFactory("http://www.eclipse.org/papyurs/0.7.0/Resource");
- if (theResourceFactory != null) {
+ if(theResourceFactory != null) {
return theResourceFactory;
}
} catch (Exception exception) {
@@ -64,7 +64,7 @@ public class ResourceFactoryImpl extends EFactoryImpl implements ResourceFactory
*/
@Override
public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
+ switch(eClass.getClassifierID()) {
case ResourcePackage.RESOURCE:
return createResource();
case ResourcePackage.RESOURCE_EOBJECT:
@@ -100,7 +100,7 @@ public class ResourceFactoryImpl extends EFactoryImpl implements ResourceFactory
* @generated
*/
public ResourcePackage getResourcePackage() {
- return (ResourcePackage) getEPackage();
+ return (ResourcePackage)getEPackage();
}
/**
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java
index 693defe9e35..d480819c9b0 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourceImpl.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.impl;
import java.util.Collection;
@@ -80,9 +80,9 @@ public class ResourceImpl extends EObjectImpl implements Resource {
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
+ switch(featureID) {
case ResourcePackage.RESOURCE__EOBJECTS:
- return ((InternalEList<?>) getEobjects()).basicRemove(otherEnd, msgs);
+ return ((InternalEList<?>)getEobjects()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -94,7 +94,7 @@ public class ResourceImpl extends EObjectImpl implements Resource {
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
+ switch(featureID) {
case ResourcePackage.RESOURCE__EOBJECTS:
return getEobjects();
}
@@ -109,10 +109,10 @@ public class ResourceImpl extends EObjectImpl implements Resource {
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
- switch (featureID) {
+ switch(featureID) {
case ResourcePackage.RESOURCE__EOBJECTS:
getEobjects().clear();
- getEobjects().addAll((Collection<? extends EObject>) newValue);
+ getEobjects().addAll((Collection<? extends EObject>)newValue);
return;
}
super.eSet(featureID, newValue);
@@ -125,7 +125,7 @@ public class ResourceImpl extends EObjectImpl implements Resource {
*/
@Override
public void eUnset(int featureID) {
- switch (featureID) {
+ switch(featureID) {
case ResourcePackage.RESOURCE__EOBJECTS:
getEobjects().clear();
return;
@@ -140,7 +140,7 @@ public class ResourceImpl extends EObjectImpl implements Resource {
*/
@Override
public boolean eIsSet(int featureID) {
- switch (featureID) {
+ switch(featureID) {
case ResourcePackage.RESOURCE__EOBJECTS:
return !getEobjects().isEmpty();
}
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java
index eeb24b814ef..461502d8e79 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/impl/ResourcePackageImpl.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.impl;
import static org.eclipse.papyrus.resource.ResourcePackage.RESOURCE;
@@ -46,13 +46,13 @@ public class ResourcePackageImpl extends EPackageImpl implements ResourcePackage
private EClass resourceEObjectEClass = null;
/**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package package URI
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package package URI
* value.
* <p>
* Note: the correct way to create the package is via the static factory method {@link #init
- * init()}, which also performs initialization of the package, or returns the registered
- * package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
*
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.papyrus.resource.ResourcePackage#eNS_URI
@@ -75,9 +75,8 @@ public class ResourcePackageImpl extends EPackageImpl implements ResourcePackage
* upon which it depends.
*
* <p>
- * This method is used to initialize {@link ResourcePackage#eINSTANCE} when that field is
- * accessed. Clients should not invoke it directly. Instead, they should simply access that
- * field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * This method is used to initialize {@link ResourcePackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly.
+ * Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #eNS_URI
* @see #createPackageContents()
@@ -85,11 +84,11 @@ public class ResourcePackageImpl extends EPackageImpl implements ResourcePackage
* @generated
*/
public static ResourcePackage init() {
- if (isInited)
- return (ResourcePackage) EPackage.Registry.INSTANCE.getEPackage(ResourcePackage.eNS_URI);
+ if(isInited)
+ return (ResourcePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcePackage.eNS_URI);
// Obtain or create and register package
- ResourcePackageImpl theResourcePackage = (ResourcePackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourcePackageImpl ? EPackage.Registry.INSTANCE
+ ResourcePackageImpl theResourcePackage = (ResourcePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourcePackageImpl ? EPackage.Registry.INSTANCE
.get(eNS_URI)
: new ResourcePackageImpl());
@@ -124,7 +123,7 @@ public class ResourcePackageImpl extends EPackageImpl implements ResourcePackage
* @generated
*/
public EReference getResource_Eobjects() {
- return (EReference) resourceEClass.getEStructuralFeatures().get(0);
+ return (EReference)resourceEClass.getEStructuralFeatures().get(0);
}
/**
@@ -142,7 +141,7 @@ public class ResourcePackageImpl extends EPackageImpl implements ResourcePackage
* @generated
*/
public ResourceFactory getResourceFactory() {
- return (ResourceFactory) getEFactoryInstance();
+ return (ResourceFactory)getEFactoryInstance();
}
/**
@@ -159,7 +158,7 @@ public class ResourcePackageImpl extends EPackageImpl implements ResourcePackage
* @generated
*/
public void createPackageContents() {
- if (isCreated)
+ if(isCreated)
return;
isCreated = true;
@@ -184,7 +183,7 @@ public class ResourcePackageImpl extends EPackageImpl implements ResourcePackage
* @generated
*/
public void initializePackageContents() {
- if (isInitialized)
+ if(isInitialized)
return;
isInitialized = true;
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java
index d2b5964b18b..78871822859 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceAdapterFactory.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.util;
import org.eclipse.emf.common.notify.Adapter;
@@ -22,8 +22,8 @@ import org.eclipse.papyrus.resource.ResourceEObject;
import org.eclipse.papyrus.resource.ResourcePackage;
/**
- * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter
- * <code>createXXX</code> method for each class of the model. <!-- end-user-doc -->
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
*
* @see org.eclipse.papyrus.resource.ResourcePackage
* @generated
@@ -43,7 +43,7 @@ public class ResourceAdapterFactory extends AdapterFactoryImpl {
* @generated
*/
public ResourceAdapterFactory() {
- if (modelPackage == null) {
+ if(modelPackage == null) {
modelPackage = ResourcePackage.eINSTANCE;
}
}
@@ -58,11 +58,11 @@ public class ResourceAdapterFactory extends AdapterFactoryImpl {
*/
@Override
public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
+ if(object == modelPackage) {
return true;
}
- if (object instanceof EObject) {
- return ((EObject) object).eClass().getEPackage() == modelPackage;
+ if(object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
}
@@ -95,13 +95,13 @@ public class ResourceAdapterFactory extends AdapterFactoryImpl {
* Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param target
- * the object to adapt.
+ * the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject) target);
+ return modelSwitch.doSwitch((EObject)target);
}
/**
@@ -119,8 +119,7 @@ public class ResourceAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.papyrus.resource.ResourceEObject <em>EObject</em>}'. <!-- begin-user-doc
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.resource.ResourceEObject <em>EObject</em>}'. <!-- begin-user-doc
* --> This default implementation returns null so that we can easily ignore cases; it's useful
* to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
*
diff --git a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java
index f210037ca76..a123d7f01b6 100644
--- a/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java
+++ b/plugins/profile-tool/org.eclipse.papyrus.resource/src/org/eclipse/papyrus/resource/util/ResourceSwitch.java
@@ -10,7 +10,7 @@
* Contributors:
* Tristan Faure (Atos Origin) tristan.faure@atosorigin.com - Initial API and implementation
*
- *****************************************************************************/
+ *****************************************************************************/
package org.eclipse.papyrus.resource.util;
import java.util.List;
@@ -46,7 +46,7 @@ public class ResourceSwitch<T> {
* @generated
*/
public ResourceSwitch() {
- if (modelPackage == null) {
+ if(modelPackage == null) {
modelPackage = ResourcePackage.eINSTANCE;
}
}
@@ -70,7 +70,7 @@ public class ResourceSwitch<T> {
* @generated
*/
protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
+ if(theEClass.eContainer() == modelPackage) {
return doSwitch(theEClass.getClassifierID(), theEObject);
} else {
List<EClass> eSuperTypes = theEClass.getESuperTypes();
@@ -86,18 +86,20 @@ public class ResourceSwitch<T> {
* @generated
*/
protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case ResourcePackage.RESOURCE: {
- Resource resource = (Resource) theEObject;
+ switch(classifierID) {
+ case ResourcePackage.RESOURCE:
+ {
+ Resource resource = (Resource)theEObject;
T result = caseResource(resource);
- if (result == null)
+ if(result == null)
result = defaultCase(theEObject);
return result;
}
- case ResourcePackage.RESOURCE_EOBJECT: {
- ResourceEObject resourceEObject = (ResourceEObject) theEObject;
+ case ResourcePackage.RESOURCE_EOBJECT:
+ {
+ ResourceEObject resourceEObject = (ResourceEObject)theEObject;
T result = caseResourceEObject(resourceEObject);
- if (result == null)
+ if(result == null)
result = defaultCase(theEObject);
return result;
}
@@ -112,7 +114,7 @@ public class ResourceSwitch<T> {
* terminate the switch. <!-- end-user-doc -->
*
* @param object
- * the target of the switch.
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Resource</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -127,7 +129,7 @@ public class ResourceSwitch<T> {
* terminate the switch. <!-- end-user-doc -->
*
* @param object
- * the target of the switch.
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -142,7 +144,7 @@ public class ResourceSwitch<T> {
* terminate the switch, but this is the last case anyway. <!-- end-user-doc -->
*
* @param object
- * the target of the switch.
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated

Back to the top