summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmusset2009-03-05 12:14:51 (EST)
committer jmusset2009-03-05 12:14:51 (EST)
commit024f7f668c04d76e590e9eea4d7ff63d73d0d61a (patch)
tree77211bb17c1d8644b99a9ddfabf3ebf899622454
parent858d64d46cbc103bd4b2e2c0799ea711027d12b4 (diff)
downloadorg.eclipse.acceleo-024f7f668c04d76e590e9eea4d7ff63d73d0d61a.zip
org.eclipse.acceleo-024f7f668c04d76e590e9eea4d7ff63d73d0d61a.tar.gz
org.eclipse.acceleo-024f7f668c04d76e590e9eea4d7ff63d73d0d61a.tar.bz2
format after renaming
-rw-r--r--examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/Activator.java14
-rw-r--r--examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/common/GenerateAll.java39
-rw-r--r--examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/popupMenus/AcceleoGenerateEcoreToPythonAction.java37
3 files changed, 52 insertions, 38 deletions
diff --git a/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/Activator.java b/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/Activator.java
index 94bd1ee..81b44e7 100644
--- a/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/Activator.java
+++ b/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/Activator.java
@@ -29,15 +29,16 @@ public class Activator extends AbstractUIPlugin {
* The shared instance.
*/
private static Activator plugin;
-
+
/**
* The constructor.
*/
public Activator() {
}
- /**{@inheritDoc}
- *
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
* @generated
*/
@@ -46,8 +47,9 @@ public class Activator extends AbstractUIPlugin {
plugin = this;
}
- /**{@inheritDoc}
- *
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
* @generated
*/
@@ -58,7 +60,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance.
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
diff --git a/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/common/GenerateAll.java b/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/common/GenerateAll.java
index da175e1..b59c1ad 100644
--- a/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/common/GenerateAll.java
+++ b/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/common/GenerateAll.java
@@ -23,7 +23,6 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.osgi.framework.Bundle;
-
/**
* Main entry point of the 'Ecore To Python' generation module.
*
@@ -76,44 +75,51 @@ public class GenerateAll {
if (!targetFolder.exists()) {
targetFolder.mkdirs();
}
-
- final URI template0 = getTemplateURI("org.eclipse.acceleo.module.example.ecore2python", new Path("/org/eclipse/acceleo/module/ecore2python/commonClass.emtl"));
- org.eclipse.acceleo.module.ecore2python.CommonClass gen0 = new org.eclipse.acceleo.module.ecore2python.CommonClass(modelURI, targetFolder, arguments) {
+
+ final URI template0 = getTemplateURI("org.eclipse.acceleo.module.example.ecore2python", new Path(
+ "/org/eclipse/acceleo/module/ecore2python/commonClass.emtl"));
+ org.eclipse.acceleo.module.ecore2python.CommonClass gen0 = new org.eclipse.acceleo.module.ecore2python.CommonClass(
+ modelURI, targetFolder, arguments) {
protected URI createTemplateURI(String entry) {
return template0;
}
};
gen0.doGenerate();
-
+
EObject model = gen0.getModel();
if (model != null) {
-
- final URI template1 = getTemplateURI("org.eclipse.acceleo.module.example.ecore2python", new Path("/org/eclipse/acceleo/module/ecore2python/factory.emtl"));
- org.eclipse.acceleo.module.ecore2python.Factory gen1 = new org.eclipse.acceleo.module.ecore2python.Factory(model, targetFolder, arguments) {
+
+ final URI template1 = getTemplateURI("org.eclipse.acceleo.module.example.ecore2python", new Path(
+ "/org/eclipse/acceleo/module/ecore2python/factory.emtl"));
+ org.eclipse.acceleo.module.ecore2python.Factory gen1 = new org.eclipse.acceleo.module.ecore2python.Factory(
+ model, targetFolder, arguments) {
protected URI createTemplateURI(String entry) {
return template1;
}
};
gen1.doGenerate();
- final URI template2 = getTemplateURI("org.eclipse.acceleo.module.example.ecore2python", new Path("/org/eclipse/acceleo/module/ecore2python/init.emtl"));
- org.eclipse.acceleo.module.ecore2python.Init gen2 = new org.eclipse.acceleo.module.ecore2python.Init(model, targetFolder, arguments) {
+ final URI template2 = getTemplateURI("org.eclipse.acceleo.module.example.ecore2python", new Path(
+ "/org/eclipse/acceleo/module/ecore2python/init.emtl"));
+ org.eclipse.acceleo.module.ecore2python.Init gen2 = new org.eclipse.acceleo.module.ecore2python.Init(
+ model, targetFolder, arguments) {
protected URI createTemplateURI(String entry) {
return template2;
}
};
gen2.doGenerate();
- final URI template3 = getTemplateURI("org.eclipse.acceleo.module.example.ecore2python", new Path("/org/eclipse/acceleo/module/ecore2python/parser.emtl"));
- org.eclipse.acceleo.module.ecore2python.Parser gen3 = new org.eclipse.acceleo.module.ecore2python.Parser(model, targetFolder, arguments) {
+ final URI template3 = getTemplateURI("org.eclipse.acceleo.module.example.ecore2python", new Path(
+ "/org/eclipse/acceleo/module/ecore2python/parser.emtl"));
+ org.eclipse.acceleo.module.ecore2python.Parser gen3 = new org.eclipse.acceleo.module.ecore2python.Parser(
+ model, targetFolder, arguments) {
protected URI createTemplateURI(String entry) {
return template3;
}
};
gen3.doGenerate();
}
-
-
+
}
-
+
/**
* Finds the template in the plug-in. Returns the template plug-in URI.
*
@@ -156,7 +162,8 @@ public class GenerateAll {
}
URI result;
if (url != null) {
- result = URI.createPlatformPluginURI(new Path(bundleID).append(new Path(url.getPath())).toString(), false);
+ result = URI.createPlatformPluginURI(new Path(bundleID).append(new Path(url.getPath()))
+ .toString(), false);
} else {
result = URI.createPlatformResourceURI(new Path(bundleID).append(relativePath).toString(), false);
}
diff --git a/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/popupMenus/AcceleoGenerateEcoreToPythonAction.java b/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/popupMenus/AcceleoGenerateEcoreToPythonAction.java
index 40def88..71de593 100644
--- a/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/popupMenus/AcceleoGenerateEcoreToPythonAction.java
+++ b/examples/org.eclipse.acceleo.module.example.ecore2python.ui/src/org/eclipse/acceleo/module/example/ecore2python/ui/popupMenus/AcceleoGenerateEcoreToPythonAction.java
@@ -12,12 +12,14 @@ package org.eclipse.acceleo.module.example.ecore2python.ui.popupMenus;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.ArrayList;
-import org.eclipse.core.resources.IFile;
+import org.eclipse.acceleo.module.example.ecore2python.ui.Activator;
+import org.eclipse.acceleo.module.example.ecore2python.ui.common.GenerateAll;
import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -28,8 +30,6 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.acceleo.module.example.ecore2python.ui.Activator;
-import org.eclipse.acceleo.module.example.ecore2python.ui.common.GenerateAll;
import org.eclipse.ui.IActionDelegate;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionDelegate;
@@ -38,29 +38,31 @@ import org.eclipse.ui.actions.ActionDelegate;
* Ecore To Python code generation.
*
* @author <a href="mailto:jonathan.musset@obeo.fr">Jonathan Musset</a>
- *
*/
public class AcceleoGenerateEcoreToPythonAction extends ActionDelegate implements IActionDelegate {
-
+
/**
* Selected model files.
*/
protected List<IFile> files;
- /**{@inheritDoc}
- *
- * @see org.eclipse.ui.actions.ActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.actions.ActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
* @generated
*/
@SuppressWarnings("unchecked")
public void selectionChanged(IAction action, ISelection selection) {
if (selection instanceof IStructuredSelection) {
- files = ((IStructuredSelection) selection).toList();
+ files = ((IStructuredSelection)selection).toList();
}
}
- /**{@inheritDoc}
- *
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction)
* @generated
*/
@@ -72,13 +74,16 @@ public class AcceleoGenerateEcoreToPythonAction extends ActionDelegate implement
Iterator<IFile> filesIt = files.iterator();
while (filesIt.hasNext()) {
IFile model = (IFile)filesIt.next();
- URI modelURI = URI.createPlatformResourceURI(model.getFullPath().toString(), true);
+ URI modelURI = URI
+ .createPlatformResourceURI(model.getFullPath().toString(), true);
try {
IContainer target = model.getProject().getFolder("src-gen");
- GenerateAll generator = new GenerateAll(modelURI, target.getLocation().toFile(), getArguments());
+ GenerateAll generator = new GenerateAll(modelURI, target.getLocation()
+ .toFile(), getArguments());
generator.doGenerate();
} catch (IOException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e
+ .getMessage(), e);
Activator.getDefault().getLog().log(status);
} finally {
model.getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor);
@@ -112,4 +117,4 @@ public class AcceleoGenerateEcoreToPythonAction extends ActionDelegate implement
return new ArrayList<String>();
}
-} \ No newline at end of file
+}