Skip to content

Commit 3a06474

Browse files
committed
Address review comments
1 parent 2d3138d commit 3a06474

2 files changed

Lines changed: 20 additions & 18 deletions

File tree

plugins/com.google.cloud.tools.eclipse.appengine.newproject/src/com/google/cloud/tools/eclipse/appengine/newproject/AppEngineProjectWizard.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@
4343
import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
4444
import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
4545

46-
/** Expected to be created via the {@link ServiceContextFactory}. */
46+
/**
47+
* Base class for App Engine projection creation.
48+
* <p>
49+
* Expected to be created via the {@link ServiceContextFactory}.
50+
*/
4751
public abstract class AppEngineProjectWizard extends Wizard implements INewWizard {
4852

4953
protected AppEngineWizardPage page = null;

plugins/com.google.cloud.tools.eclipse.util/src/com/google/cloud/tools/eclipse/util/service/ServiceContextFactory.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,22 @@ public class ServiceContextFactory implements IExecutableExtensionFactory, IExec
3737
@Override
3838
public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
3939
throws CoreException {
40-
if (data == null || !(data instanceof String)) {
41-
throw new CoreException(StatusUtil.error(getClass(), "Data must be a class name"));
42-
}
40+
if (data == null || !(data instanceof String)) {
41+
throw new CoreException(StatusUtil.error(getClass(), "Data must be a class name"));
42+
}
4343
configElement = config;
44-
String className = (String) data;
45-
String bundleSymbolicName = config.getNamespaceIdentifier();
46-
Bundle bundle = Platform.getBundle(bundleSymbolicName);
47-
if (bundle == null) {
48-
throw new CoreException(StatusUtil.error(this, "Missing bundle " + bundleSymbolicName));
49-
}
50-
try {
51-
clazz = bundle.loadClass(className);
52-
} catch (ClassNotFoundException ex) {
53-
throw new CoreException(StatusUtil.error(this,
54-
"Could not load class " + className
55-
+ " from bundle " + bundle.getSymbolicName(),
56-
ex));
57-
}
44+
String className = (String) data;
45+
String bundleSymbolicName = config.getNamespaceIdentifier();
46+
Bundle bundle = Platform.getBundle(bundleSymbolicName);
47+
if (bundle == null) {
48+
throw new CoreException(StatusUtil.error(this, "Missing bundle " + bundleSymbolicName));
49+
}
50+
try {
51+
clazz = bundle.loadClass(className);
52+
} catch (ClassNotFoundException ex) {
53+
throw new CoreException(StatusUtil.error(this,
54+
"Could not load class " + className + " from bundle " + bundle.getSymbolicName(), ex));
55+
}
5856
}
5957

6058
@Override

0 commit comments

Comments
 (0)