fixed warnings
diff --git a/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.helloworld/src/org/eclipse/emf/emfstore/exampleclient/Activator.java b/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.helloworld/src/org/eclipse/emf/emfstore/exampleclient/Activator.java
index 8a398f9..7ddf909 100644
--- a/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.helloworld/src/org/eclipse/emf/emfstore/exampleclient/Activator.java
+++ b/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.helloworld/src/org/eclipse/emf/emfstore/exampleclient/Activator.java
@@ -1,45 +1,58 @@
+/**
+ * Copyright (c) 2008-2011 Chair for Applied Software Engineering,
+ * Technische Universitaet Muenchen.
+ * 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:
+ ******************************************************************************/
+
package org.eclipse.emf.emfstore.exampleclient;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
- * The activator class controls the plug-in life cycle
+ * The activator class controls the plug-in life cycle.
*/
public class Activator extends AbstractUIPlugin {
- // The plug-in ID
+ /**
+ * The plug-in ID.
+ */
public static final String PLUGIN_ID = "exampleClient";
// The shared instance
private static Activator plugin;
/**
- * The constructor
+ * The constructor.
*/
public Activator() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ /**
+ * {@inheritDoc}
*/
+ // BEGIN SUPRESS CATCH EXCEPTION
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ /**
+ * {@inheritDoc}
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
+ // END SUPRESS CATCH EXCEPTION
/**
- * Returns the shared instance
+ * Returns the shared instance.
*
* @return the shared instance
*/
diff --git a/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.helloworld/src/org/eclipse/emf/emfstore/exampleclient/Application.java b/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.helloworld/src/org/eclipse/emf/emfstore/exampleclient/Application.java
index 5222c5f..9f2b9dc 100644
--- a/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.helloworld/src/org/eclipse/emf/emfstore/exampleclient/Application.java
+++ b/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.helloworld/src/org/eclipse/emf/emfstore/exampleclient/Application.java
@@ -1,8 +1,14 @@
/**
- * <copyright> Copyright (c) 2008-2009 Jonas Helming, Maximilian Koegel. 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 </copyright>
- */
+ * Copyright (c) 2008-2011 Chair for Applied Software Engineering,
+ * Technische Universitaet Muenchen.
+ * 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:
+ ******************************************************************************/
+
package org.eclipse.emf.emfstore.exampleclient;
import java.util.List;
@@ -23,8 +29,15 @@
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
+/**
+ * Example client.
+ */
public class Application implements IApplication {
+ /**
+ * {@inheritDoc}
+ */
+ // BEGIN SUPRESS CATCH EXCEPTION
public Object start(IApplicationContext context) throws Exception {
// Run a client that shows the basic features of the EMFstore
@@ -40,6 +53,7 @@
return IApplication.EXIT_OK;
}
+ // END SUPRESS CATCH EXCEPTION
private void runClient() throws EmfStoreException {
System.out.println("Client starting...");
@@ -122,7 +136,4 @@
return player;
}
- public void stop() {
- // TODO Auto-generated method stub
- }
-}
+}
\ No newline at end of file
diff --git a/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.merging/src/org/eclipse/emf/emfstore/example/merging/Activator.java b/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.merging/src/org/eclipse/emf/emfstore/example/merging/Activator.java
index c639bfb..f15fce4 100644
--- a/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.merging/src/org/eclipse/emf/emfstore/example/merging/Activator.java
+++ b/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.merging/src/org/eclipse/emf/emfstore/example/merging/Activator.java
@@ -1,45 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2011 Chair for Applied Software Engineering,
+ * Technische Universitaet Muenchen.
+ * 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:
+ ******************************************************************************/
package org.eclipse.emf.emfstore.example.merging;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
- * The activator class controls the plug-in life cycle
+ * The activator class controls the plug-in life cycle.
*/
public class Activator extends AbstractUIPlugin {
- // The plug-in ID
+ /**
+ * The plug-in ID.
+ */
public static final String PLUGIN_ID = "exampleClient";
// The shared instance
private static Activator plugin;
/**
- * The constructor
+ * The constructor.
*/
public Activator() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ /**
+ * {@inheritDoc}
*/
+ // BEGIN SUPRESS CATCH EXCEPTION
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ /**
+ * {@inheritDoc}
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
+ // END SUPRESS CATCH EXCEPTION
/**
- * Returns the shared instance
+ * Returns the shared instance.
*
* @return the shared instance
*/
diff --git a/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.merging/src/org/eclipse/emf/emfstore/example/merging/Application.java b/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.merging/src/org/eclipse/emf/emfstore/example/merging/Application.java
index 1616df6..ab9e34b 100644
--- a/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.merging/src/org/eclipse/emf/emfstore/example/merging/Application.java
+++ b/org.eclipse.emf.emfstore.example.installer/examples/org.eclipse.emf.emfstore.example.merging/src/org/eclipse/emf/emfstore/example/merging/Application.java
@@ -1,8 +1,14 @@
/**
- * <copyright> Copyright (c) 2008-2009 Jonas Helming, Maximilian Koegel. 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 </copyright>
- */
+ * Copyright (c) 2008-2011 Chair for Applied Software Engineering,
+ * Technische Universitaet Muenchen.
+ * 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:
+ ******************************************************************************/
+
package org.eclipse.emf.emfstore.example.merging;
import java.util.ArrayList;
@@ -25,7 +31,6 @@
import org.eclipse.emf.emfstore.common.model.ModelElementId;
import org.eclipse.emf.emfstore.common.model.Project;
import org.eclipse.emf.emfstore.common.model.util.ModelUtil;
-import org.eclipse.emf.emfstore.server.exceptions.AccessControlException;
import org.eclipse.emf.emfstore.server.exceptions.BaseVersionOutdatedException;
import org.eclipse.emf.emfstore.server.exceptions.EmfStoreException;
import org.eclipse.emf.emfstore.server.model.ProjectInfo;
@@ -39,13 +44,21 @@
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
+/**
+ * Merging example application.
+ */
public class Application implements IApplication {
+
private ProjectSpace project1;
private League league1;
private ProjectSpace project2;
private League league2;
private LogMessage logMessage;
+ /**
+ * {@inheritDoc}
+ */
+ // BEGIN SUPRESS CATCH EXCEPTION
public Object start(IApplicationContext context) throws Exception {
WorkspaceManager.init();
@@ -65,8 +78,15 @@
return IApplication.EXIT_OK;
}
+ // END SUPRESS CATCH EXCEPTION
- private void runClient() throws AccessControlException, EmfStoreException {
+ /**
+ * Runs the application.
+ *
+ * @throws EmfStoreException
+ * in case any error occurs
+ */
+ private void runClient() throws EmfStoreException {
System.out.println("Client starting...");
// Sets up the workspace by cleaning all contents
@@ -103,11 +123,8 @@
private ChangePackage myChangePackage;
private List<ChangePackage> theirChangePackages;
- public boolean resolveConflicts(Project project,
- List<ChangePackage> theirChangePackages,
- ChangePackage myChangePackage,
- PrimaryVersionSpec baseVersion,
- PrimaryVersionSpec targetVersion) {
+ public boolean resolveConflicts(Project project, List<ChangePackage> theirChangePackages,
+ ChangePackage myChangePackage, PrimaryVersionSpec baseVersion, PrimaryVersionSpec targetVersion) {
this.theirChangePackages = theirChangePackages;
this.myChangePackage = myChangePackage;
@@ -140,8 +157,7 @@
// there are changes anyway)
}
- public boolean inspectChanges(ProjectSpace projectSpace,
- List<ChangePackage> changes) {
+ public boolean inspectChanges(ProjectSpace projectSpace, List<ChangePackage> changes) {
// accept incoming changes (we could cancel the update by
// returning false here)
return true;
@@ -166,8 +182,7 @@
};
// run update in project 2 with our callback
- System.out
- .println("\nUpdate of project 2 with conflict resolver...");
+ System.out.println("\nUpdate of project 2 with conflict resolver...");
project2.update(VersionSpec.HEAD_VERSION, updateCallback,
new ConsoleProgressMonitor());
@@ -190,11 +205,10 @@
/**
* Creates a default workspace and deletes all remote projects.
*
- * @throws AccessControlException
* @throws EmfStoreException
+ * in case any error occurs
*/
- private void setupWorkspace() throws AccessControlException,
- EmfStoreException {
+ private void setupWorkspace() throws EmfStoreException {
// The workspace is the core controler to access
// local and remote projects
Workspace workspace = WorkspaceManager.getInstance()
@@ -241,7 +255,8 @@
/**
* Handles the conflicting project2.
*
- * @param conflictingProject2
+ * @param conflictingProject2
+ * the conflicting project
*/
protected void handleConflict(ProjectSpace conflictingProject2) {
try {
@@ -259,10 +274,8 @@
private ArrayList<AbstractOperation> rejectedTheirs;
public boolean resolveConflicts(Project project,
- List<ChangePackage> theirChangePackages,
- ChangePackage myChangePackage,
- PrimaryVersionSpec baseVersion,
- PrimaryVersionSpec targetVersion) {
+ List<ChangePackage> theirChangePackages, ChangePackage myChangePackage,
+ PrimaryVersionSpec baseVersion, PrimaryVersionSpec targetVersion) {
// all local projects for project2 are accepted
acceptedMine = new ArrayList<AbstractOperation>();
@@ -343,6 +356,8 @@
"League of project2. Name is %s",
leagueOfProject2.getName()));
break;
+ default:
+ break;
}
}
}
@@ -360,7 +375,5 @@
player.setEMail(String.format("%s@emfstore.org", name));
return player;
}
-
- public void stop() {
- }
-}
+
+}
\ No newline at end of file