Author: adietish
Date: 2012-01-20 04:52:35 -0500 (Fri, 20 Jan 2012)
New Revision: 37994
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java
Log:
[JBIDE-10479] added monitor when saving pom
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java 2012-01-20
09:45:15 UTC (rev 37993)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java 2012-01-20
09:52:35 UTC (rev 37994)
@@ -97,7 +97,7 @@
addToModified(copyOpenshiftConfigurations(getApplication(), getRemoteName(), project,
monitor));
addToModified(setupGitIgnore(project, monitor));
- addToModified(setupOpenShiftMavenProfile(project));
+ addToModified(setupOpenShiftMavenProfile(project, monitor));
EGitUtils.addRemoteTo(
getRemoteName(),
@@ -114,7 +114,7 @@
EGitUtils.commit(project, monitor);
}
- private IResource setupOpenShiftMavenProfile(IProject project) throws CoreException {
+ private IResource setupOpenShiftMavenProfile(IProject project, IProgressMonitor monitor)
throws CoreException {
Assert.isLegal(OpenShiftMavenProfile.isMavenProject(project));
OpenShiftMavenProfile profile = new OpenShiftMavenProfile(project,
OpenShiftUIActivator.PLUGIN_ID);
@@ -122,7 +122,7 @@
return null;
}
profile.addToPom(project.getName());
- return profile.savePom();
+ return profile.savePom(monitor);
}
/**
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java 2012-01-20
09:45:15 UTC (rev 37993)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java 2012-01-20
09:52:35 UTC (rev 37994)
@@ -32,6 +32,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
@@ -272,12 +273,13 @@
return new Status(IStatus.ERROR, pluginId, message);
}
- public IFile savePom() throws CoreException {
+ public IFile savePom(IProgressMonitor monitor) throws CoreException {
Writer writer = null;
try {
writer = new StringWriter();
createTransformer().transform(new DOMSource(getDocument()), new
StreamResult(writer));
- pomFile.setContents(new ByteArrayInputStream(writer.toString().getBytes()),
IResource.FORCE, null);
+ pomFile.setContents(
+ new ByteArrayInputStream(writer.toString().getBytes()), IResource.FORCE, monitor);
return pomFile;
} catch (TransformerConfigurationException e) {
throw new CoreException(createStatus(e));
Show replies by date