diff options
author | Alexander Kurtakov | 2011-08-08 13:42:33 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2011-08-09 04:44:50 +0000 |
commit | a77b60b5aa88f5b1cdb74d2789edf00fa548dd6e (patch) | |
tree | 4733d5fe121cc2f8c8710c9ea4996d4c630ebb40 /rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/SpecfilePomWriter.java | |
parent | 952ddb60a7c49e009331a5aa629ef926a284703b (diff) | |
download | org.eclipse.linuxtools-a77b60b5aa88f5b1cdb74d2789edf00fa548dd6e.tar.gz org.eclipse.linuxtools-a77b60b5aa88f5b1cdb74d2789edf00fa548dd6e.tar.xz org.eclipse.linuxtools-a77b60b5aa88f5b1cdb74d2789edf00fa548dd6e.zip |
Move everything to internal packages.
Diffstat (limited to 'rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/SpecfilePomWriter.java')
-rw-r--r-- | rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/SpecfilePomWriter.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/SpecfilePomWriter.java b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/SpecfilePomWriter.java new file mode 100644 index 0000000000..8d6c94893c --- /dev/null +++ b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/SpecfilePomWriter.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2009 Red Hat, Inc. + * 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: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ +package org.eclipse.linuxtools.internal.rpmstubby; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; + +/** + * Utility class used for writing the generated specfile to a file. + * + */ +public class SpecfilePomWriter { + + /** + * Parse the pom.xml and write the generated specfile. + * @param pomFile The pom.xml file. + */ + public void write(IFile pomFile) { + + StubbyPomGenerator generator = new StubbyPomGenerator(pomFile); + try { + generator.writeContent(pomFile.getProject().getName()); + } catch (CoreException e) { + StubbyLog.logError(e); + } + } + +} |