Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'rpm/org.eclipse.linuxtools.rpm.ui/src/org')
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java137
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java170
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java111
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMNewProject.java93
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java128
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java122
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java451
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportWizard.java79
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java100
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java153
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java101
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java99
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java159
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties22
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/redhat-system_tools.pngbin0 -> 2438 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/rpm_strings.properties174
19 files changed, 2184 insertions, 0 deletions
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java
new file mode 100644
index 0000000000..545a6cd707
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 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 - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui;
+
+public interface IRPMUIConstants {
+
+ public static final String LINE_SEP = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ public enum BuildType { NONE, ALL, BINARY, SOURCE}
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java
new file mode 100644
index 0000000000..1aeb68eb31
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 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 - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.rpm_strings"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java
new file mode 100644
index 0000000000..743f0f96aa
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.linuxtools.rpm.core.RPMProject;
+import org.eclipse.linuxtools.rpm.ui.IRPMUIConstants.BuildType;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
+
+public class RPMExportOperation implements IRunnableWithProgress {
+ private IProgressMonitor monitor;
+ private ArrayList<Exception> rpm_errorTable;
+ private RPMProject rpmProject;
+ private BuildType exportType;
+
+ public RPMExportOperation(RPMProject rpmProject, BuildType exportType) {
+ this.rpmProject = rpmProject;
+ this.exportType = exportType;
+ }
+
+ /**
+ * @see org.eclipse.jface.operation.IRunnableWithProgress#run(IProgressMonitor)
+ *
+ */
+ public void run(IProgressMonitor progressMonitor)
+ throws InvocationTargetException {
+ int totalWork = 2;
+
+ monitor = progressMonitor;
+
+ // We keep a all our reported errors in an ArrayList.
+ rpm_errorTable = new ArrayList<Exception>();
+
+ // Start progress
+ monitor.beginTask(Messages.getString("RPMExportOperation.Starting"), //$NON-NLS-1$
+ totalWork);
+ monitor.worked(1);
+ MessageConsole myConsole = findConsole("rpmbuild"); //$NON-NLS-1$
+ MessageConsoleStream out = myConsole.newMessageStream();
+ myConsole.clearConsole();
+ myConsole.activate();
+ switch (exportType) {
+ case ALL:
+ try {
+ monitor.setTaskName(Messages
+ .getString("RPMExportOperation.Executing_RPM_Export")); //$NON-NLS-1$
+ rpmProject.buildAll(out);
+ } catch (Exception e) {
+ rpm_errorTable.add(e);
+ }
+ break;
+
+ case BINARY:
+ monitor.setTaskName(Messages
+ .getString("RPMExportOperation.Executing_RPM_Export")); //$NON-NLS-1$
+ try {
+ rpmProject.buildBinaryRPM(out);
+ } catch (Exception e) {
+ rpm_errorTable.add(e);
+ }
+ break;
+
+ case SOURCE:
+ monitor.setTaskName(Messages
+ .getString("RPMExportOperation.Executing_SRPM_Export")); //$NON-NLS-1$
+ try {
+ rpmProject.buildSourceRPM(out);
+ } catch (Exception e) {
+ rpm_errorTable.add(e);
+ }
+ break;
+ }
+ monitor.worked(1);
+ }
+
+ public MultiStatus getStatus() {
+ IStatus[] errors = new IStatus[rpm_errorTable.size()];
+ Iterator<Exception> count = rpm_errorTable.iterator();
+ int iCount = 0;
+ String error_message = Messages.getString("RPMExportOperation.0"); //$NON-NLS-1$
+ while (count.hasNext()) {
+
+ Object anonErrorObject = count.next();
+ if (anonErrorObject instanceof Throwable) {
+ Throwable errorObject = (Throwable) anonErrorObject;
+ error_message = errorObject.getMessage();
+
+ } else if (anonErrorObject instanceof Status) {
+ Status errorObject = (Status) anonErrorObject;
+ error_message = errorObject.getMessage();
+ }
+ IStatus error = new Status(IStatus.ERROR, "RPM Plugin", IStatus.OK, //$NON-NLS-1$
+ error_message, null);
+ errors[iCount] = error;
+ iCount++;
+ }
+
+ return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors,
+ Messages.getString("RPMExportOperation.Open_SRPM_Errors"), //$NON-NLS-1$
+ null);
+ }
+
+ private MessageConsole findConsole(String name) {
+ ConsolePlugin plugin = ConsolePlugin.getDefault();
+ IConsoleManager conMan = plugin.getConsoleManager();
+ IConsole[] existing = conMan.getConsoles();
+ for (int i = 0; i < existing.length; i++)
+ if (name.equals(existing[i].getName()))
+ return (MessageConsole) existing[i];
+ // no console found, so create a new one
+ MessageConsole myConsole = new MessageConsole(name, null);
+ conMan.addConsoles(new IConsole[] { myConsole });
+ return myConsole;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java
new file mode 100644
index 0000000000..6adb1d965e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005, 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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.linuxtools.rpm.core.RPMProject;
+import org.eclipse.linuxtools.rpm.ui.IRPMUIConstants.BuildType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+
+/**
+ * S/RPM export Defines the page that is shown to the user when they choose to
+ * export to an S/RPM. Defines the UI elements shown, and the basic validation.
+ * RPMExportPage. Called by RPMExportWizard. Class can not be subclassed extends
+ * WizardPage for the RPM export wizard, implements Listener
+ */
+public class RPMExportPage extends WizardPage implements Listener {
+
+ // Checkbox Buttons
+ private Button exportBinary;
+ private Button exportSource;
+
+ // The currently selected RPM project
+ private RPMProject rpmProject;
+
+ public RPMExportPage(IProject rpmProject) {
+ super(
+ Messages.getString("RPMExportPage.Export_SRPM"), //$NON-NLS-1$
+ Messages.getString("RPMExportPage.Export_SRPM_from_project"), null); //$NON-NLS-1$
+ setDescription(Messages
+ .getString("RPMExportPage.Select_project_export")); //$NON-NLS-1$
+ try {
+ this.rpmProject = new RPMProject(rpmProject);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ setPageComplete(true);
+ }
+
+ public RPMProject getSelectedRPMProject() {
+ return rpmProject;
+ }
+
+ public BuildType getExportType() {
+ BuildType exportType = BuildType.NONE;
+ if (exportBinary.getSelection() && exportSource.getSelection()) {
+ exportType = BuildType.ALL;
+ } else if (exportBinary.getSelection()) {
+ exportType = BuildType.BINARY;
+ } else if (exportSource.getSelection()) {
+ exportType = BuildType.SOURCE;
+ }
+ return exportType;
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(Composite)
+ *
+ * Parent control. Creates the listbox, Destination box, and options
+ * box
+ *
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+
+ // Create a layout for the wizard page
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+ setControl(composite);
+
+ if (rpmProject != null) {
+ // Create contols on the page
+ createExportTypeControls(composite);
+
+ // Check if the project has changed
+ // and therefore the project needs a patch
+ setPageComplete(false);
+ } else {
+ createErrorControls(composite);
+ setPageComplete(true);
+ }
+ }
+
+ private void createErrorControls(Composite parent) {
+ Label label = new Label(parent, SWT.CENTER);
+ label.setText(Messages.getString("RPMExportPage.0")); //$NON-NLS-1$
+ }
+
+ private void createExportTypeControls(Composite parent) {
+ // Create a group for the control and set up the layout.
+ Group group = new Group(parent, SWT.NONE);
+ group.setLayout(new GridLayout());
+ group
+ .setText(Messages
+ .getString("RPMExportPage.Composite_Export_Type")); //$NON-NLS-1$
+ group.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL));
+
+ // Create the export binary checkbox
+ exportBinary = new Button(group, SWT.CHECK);
+ exportBinary.setText(Messages.getString("RPMExportPage.Export_Binary")); //$NON-NLS-1$
+ exportBinary.setSelection(true);
+ exportBinary.setToolTipText(Messages
+ .getString("RPMExportPage.toolTip_Export_Binary")); //$NON-NLS-1$
+
+ // Create the export source checkbox
+ exportSource = new Button(group, SWT.CHECK);
+ exportSource.setText(Messages.getString("RPMExportPage.Export_Source")); //$NON-NLS-1$
+ exportSource.setSelection(true);
+ exportSource.setToolTipText(Messages
+ .getString("RPMExportPage.toolTip_Export_Source")); //$NON-NLS-1$
+
+ SelectionListener listener = new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ handleEvent(null);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ handleEvent(null);
+ }
+ };
+ exportBinary.addSelectionListener(listener);
+ exportSource.addSelectionListener(listener);
+ }
+
+ /**
+ * canFinish()
+ *
+ * Hot validation. Called to determine whether Finish button can be set to
+ * true
+ *
+ * @return boolean. true if finish can be activated
+ */
+ public boolean canFinish() {
+ if (rpmProject != null && !exportBinary.getSelection()
+ && !exportSource.getSelection()) {
+ // Make sure either export binary/source is checked
+ setErrorMessage(Messages
+ .getString("RPMExportPage.Select_export_type")); //$NON-NLS-1$
+ return false;
+ }
+
+ setDescription(null);
+ setErrorMessage(null);
+ return true;
+ }
+
+ public void handleEvent(Event e) {
+ setPageComplete(canFinish());
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java
new file mode 100644
index 0000000000..315bb2ad7e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.lang.reflect.InvocationTargetException;
+
+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.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.linuxtools.rpm.core.RPMProjectNature;
+import org.eclipse.ui.IExportWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.progress.IProgressConstants;
+
+public class RPMExportWizard extends Wizard implements IExportWizard {
+ private RPMExportPage mainPage;
+ private IStructuredSelection selection;
+
+ /**
+ * @see org.eclipse.ui.IWorkbenchWizard#init(IWorkbench,
+ * IStructuredSelection)
+ *
+ * Basic constructor. Don't do much, just print out debug, and set
+ * progress monitor status to true
+ */
+ public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
+ setNeedsProgressMonitor(true);
+ setWindowTitle(Messages.getString("RPMExportWizard.Export_an_SRPM")); //$NON-NLS-1$
+ selection = currentSelection;
+ }
+
+ @Override
+ public boolean performFinish() {
+ // Create a new instance of the RPMExportOperation runnable
+ final RPMExportOperation rpmExport = new RPMExportOperation(mainPage
+ .getSelectedRPMProject(), mainPage.getExportType());
+
+ // Run the export
+ Job job = new Job(Messages.getString("RPMExportWizard.0")) { //$NON-NLS-1$
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
+ try {
+ rpmExport.run(monitor);
+ } catch (InvocationTargetException e) {
+ return Status.CANCEL_STATUS;
+ }
+ return rpmExport.getStatus();
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+
+ // Need to return some meaninful status. Should only return true if the
+ // wizard completed
+ // successfully.
+ return true;
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.canFinish();
+ }
+
+ // Add the RPMExportPage as the only page in this wizard.
+ @Override
+ public void addPages() {
+ IProject project = null;
+ if (selection.isEmpty()) {
+
+ } else if (!(selection.getFirstElement() instanceof IProject)) {
+ if (selection.getFirstElement() instanceof IResource) {
+ IResource resource = (IResource) selection.getFirstElement();
+ IProject parentProject = resource.getProject();
+ try {
+ if (parentProject.hasNature(RPMProjectNature.RPM_NATURE_ID)) {
+ project = parentProject;
+ }
+ } catch (CoreException e) {
+ // nothing we can do
+ }
+ }
+ } else if (selection.getFirstElement() instanceof IProject) {
+ IProject tempProject = (IProject) selection.getFirstElement();
+ try {
+ if (tempProject.hasNature(RPMProjectNature.RPM_NATURE_ID)) {
+ project = tempProject;
+ }
+ } catch (CoreException e) {
+ // nothing we can do
+ }
+ }
+
+ mainPage = new RPMExportPage(project);
+ addPage(mainPage);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMNewProject.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMNewProject.java
new file mode 100644
index 0000000000..b58def1de8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMNewProject.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * 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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMProjectNature;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
+
+public class RPMNewProject extends Wizard implements INewWizard {
+ WizardNewProjectCreationPage namePage;
+
+ @Override
+ public boolean performFinish() {
+ try {
+ WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor monitor) {
+ createProject(monitor != null ? monitor
+ : new NullProgressMonitor());
+ }
+ };
+ getContainer().run(false, true, op);
+ } catch (InvocationTargetException x) {
+ return false;
+ } catch (InterruptedException x) {
+ return false;
+ }
+ return true;
+
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.addPages();
+ namePage = new WizardNewProjectCreationPage(Messages.getString("RPMNewProject.0")); //$NON-NLS-1$
+ namePage.setTitle(Messages.getString("RPMNewProject.1")); //$NON-NLS-1$
+ namePage
+ .setDescription(Messages.getString("RPMNewProject.2")); //$NON-NLS-1$
+ namePage.setImageDescriptor(ImageDescriptor.createFromFile(getClass(),
+ "/icons/rpm.gif")); //$NON-NLS-1$
+ addPage(namePage);
+ }
+
+ protected void createProject(IProgressMonitor monitor) {
+ try {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = root.getProject(namePage.getProjectName());
+ IProjectDescription description = ResourcesPlugin.getWorkspace()
+ .newProjectDescription(project.getName());
+ if (!Platform.getLocation().equals(namePage.getLocationPath()))
+ description.setLocation(namePage.getLocationPath());
+ description
+ .setNatureIds(new String[] { RPMProjectNature.RPM_NATURE_ID });
+ project.create(description, monitor);
+ monitor.worked(10);
+ project.open(monitor);
+ project.getFolder(IRPMConstants.SPECS_FOLDER).create(true, true, monitor);
+ project.getFolder(IRPMConstants.SOURCES_FOLDER).create(true, true, monitor);
+ IFolder buildFolder = project.getFolder(IRPMConstants.BUILD_FOLDER);
+ buildFolder.create(true, true, monitor);
+ buildFolder.setHidden(true);
+ project.getFolder(IRPMConstants.RPMS_FOLDER).create(true, true, monitor);
+ project.getFolder(IRPMConstants.SRPMS_FOLDER).create(true, true, monitor);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java
new file mode 100644
index 0000000000..8838b981ef
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2005-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RPMUIPlugin extends AbstractUIPlugin {
+ //The shared instance.
+ private static RPMUIPlugin plugin;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+
+ public static final String ID = "org.eclipse.linuxtools.rpm.ui"; //$NON-NLS-1$
+
+ /**
+ * The constructor.
+ */
+ public RPMUIPlugin() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ resourceBundle = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static RPMUIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = RPMUIPlugin.getDefault().getResourceBundle();
+ try {
+ return (bundle != null) ? bundle.getString(key) : key;
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ try {
+ if (resourceBundle == null)
+ resourceBundle = ResourceBundle.getBundle("rpmui.RpmuiPluginResources"); //$NON-NLS-1$
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path.
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin("rpmui", path); //$NON-NLS-1$
+ }
+
+ public void log(Throwable e) {
+ log(new Status(IStatus.ERROR, ID, IStatus.ERROR, "Error", e)); //$NON-NLS-1$
+ }
+
+ public void log(IStatus status) {
+ getLog().log(status);
+ }
+
+ public void logErrorMessage(String message) {
+ log(new Status(IStatus.ERROR, ID, 1, message, null));
+ }
+
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window= getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java
new file mode 100644
index 0000000000..42ec7612dc
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.linuxtools.rpm.core.RPMProject;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Import Operation Class for RPM plug-in. This allows us to abstract the operations
+ * to a utility class which also inherits IRunnableWithProgress that allows use of
+ * progress bar
+ */
+
+public class SRPMImportOperation implements IRunnableWithProgress {
+ private IProject project;
+ private File sourceRPM;
+
+ // Progressmonitor
+ private IProgressMonitor monitor;
+
+ private List<Exception> rpm_errorTable;
+
+ /**
+ * Method SRPMImportOperation.
+ * @param name - (IProject) name
+ * @param srpm_name - name of input srpm
+ * @param applyPatchesFlag - Apply patches on import
+ * @param runAutoConfFlag - Run autoconf on import
+ */
+ public SRPMImportOperation(IProject project, File sourceRPM) {
+ this.project = project;
+ this.sourceRPM = sourceRPM;
+ }
+
+ /**
+ * @see org.eclipse.jface.operation.IRunnableWithProgress#run(IProgressMonitor)
+ *
+ * Perform the import of SRPM import. Call the build class incrementally
+ */
+ public void run(IProgressMonitor progressMonitor)
+ throws InvocationTargetException {
+ // Total number of work steps needed
+ int totalWork = 2;
+
+ monitor = progressMonitor;
+ rpm_errorTable = new ArrayList<Exception>();
+
+ monitor.beginTask(Messages.getString("SRPMImportOperation.Starting"), //$NON-NLS-1$
+ totalWork);
+
+ // Try to create an instance of the build class.
+ try {
+ RPMProject rpmProject = new RPMProject(project);
+ monitor.worked(1);
+ monitor.setTaskName(Messages.getString("SRPMImportOperation.Importing_SRPM")); //$NON-NLS-1$
+ rpmProject.importSourceRPM(sourceRPM);
+ } catch (Exception e) {
+ rpm_errorTable.add(e);
+ return;
+ }
+ monitor.worked(1);
+ }
+
+
+ public MultiStatus getStatus() {
+ IStatus[] errors = new IStatus[rpm_errorTable.size()];
+ Iterator<Exception> count = rpm_errorTable.iterator();
+ int iCount = 0;
+ String error_message=Messages.getString("SRPMImportOperation.0"); //$NON-NLS-1$
+ while (count.hasNext()) {
+
+ Object anonErrorObject = count.next();
+ if (anonErrorObject instanceof Throwable) {
+ Throwable errorObject = (Throwable) anonErrorObject;
+ error_message=errorObject.getMessage();
+ if (error_message == null)
+ error_message=Messages.getString("SRPMImportOperation.1"); //$NON-NLS-1$
+
+ }
+ else
+ if (anonErrorObject instanceof Status)
+ {
+ Status errorObject = (Status) anonErrorObject;
+ error_message=errorObject.getMessage();
+ if (error_message == null)
+ error_message=Messages.getString("SRPMImportOperation.2"); //$NON-NLS-1$
+ }
+ IStatus error =
+ new Status(
+ IStatus.ERROR,
+ "RPM Plugin",IStatus.OK, //$NON-NLS-1$
+ error_message,
+ null);
+ errors[iCount] = error;
+ iCount++;
+ }
+
+ return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors, Messages.getString("SRPMImportOperation.3"), //$NON-NLS-1$
+ null);
+}
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java
new file mode 100644
index 0000000000..6eb6705403
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java
@@ -0,0 +1,451 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * RPM GUI import page. Defines the page the is shown to the user when they choose
+ * to export to and RPM. Defines the UI elements shown, and the basic validation (need to add to
+ * this)
+ * SRPMImportPage. Called by SRPMImportwizard. Class can not be subclassed
+ * extends WizardPage and implements Listener (for events)
+ *
+ */
+public class SRPMImportPage extends WizardPage implements Listener {
+
+ /** This is a copy of
+ * org.eclipse.team.internal.ccvs.ui.wizards.CheckoutAsWizard.NewProjectListener**/
+ class NewProjectListener implements IResourceChangeListener {
+ private IProject newProject = null;
+
+ /**
+ * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
+ */
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta root = event.getDelta();
+ IResourceDelta[] projectDeltas = root.getAffectedChildren();
+ for (int i = 0; i < projectDeltas.length; i++) {
+ IResourceDelta delta = projectDeltas[i];
+ IResource resource = delta.getResource();
+ if (delta.getKind() == IResourceDelta.ADDED) {
+ newProject = (IProject) resource;
+ }
+ }
+ }
+
+ /**
+ * Gets the newProject.
+ *
+ * @return Returns a IProject
+ */
+ public IProject getNewProject() {
+ return newProject;
+ }
+ }
+
+ // GUI Control variables
+ private Combo sourceSRPM;
+ private Button intoConfigured;
+ private Button intoExisting;
+ private List projectList;
+ private IStructuredSelection selection;
+
+ static private Vector<String> srpmVector;
+
+ /**
+ * @see java.lang.Object#Object()
+ *
+ * Constructor for SRPMImportPage class
+ * @param aWorkbench - Workbench
+ * @param selection - IStructuredSelection
+ */
+ public SRPMImportPage(IWorkbench aWorkbench, IStructuredSelection currentSelection) {
+ super(Messages.getString("SRPMImportPage.Import_SRPM"), //$NON-NLS-1$
+ Messages.getString("SRPMImportPage.Select_project_to_import"), null); //$NON-NLS-1$
+
+ setPageComplete(false);
+ setDescription(Messages.getString(
+ "SRPMImportPage.Select_project_to_import")); //$NON-NLS-1$
+ selection = currentSelection;
+ }
+
+
+ private String getSelectedProjectName() {
+ String[] selections = projectList.getSelection();
+ if (selections.length > 0) {
+ return selections[0];
+ }
+ return null;
+ }
+
+ private File getSelectedSRPM() {
+ String srpmName = sourceSRPM.getText();
+ if(srpmName == null || srpmName.equals("")) { //$NON-NLS-1$
+ return null;
+ }
+ return new File(sourceSRPM.getText());
+ }
+
+ public void createControl(Composite parent) {
+ // Set Page complete to false. Don't allow the user to execute wizard
+ // until we have all the required data
+ setPageComplete(false);
+
+ // Create a generic composite to hold ui variable
+ Composite composite = new Composite(parent, SWT.NULL);
+
+ // Create a layout for the wizard page
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+ setControl(composite);
+
+ // Create contols on the page
+ createSourceRPMCombo(composite);
+ createProjectBox(composite);
+ }
+
+ private void createSourceRPMCombo(Composite parent) {
+ Group specGrid = new Group(parent, SWT.NONE);
+ specGrid.setLayout(new GridLayout());
+ specGrid.setText(Messages.getString("SRPMImportPage.SRPM_Name")); //$NON-NLS-1$
+ specGrid.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+
+ Composite sourceSpecComposite = new Composite(specGrid, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ sourceSpecComposite.setLayout(layout);
+ sourceSpecComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL |
+ GridData.GRAB_HORIZONTAL));
+
+ sourceSRPM = new Combo(sourceSpecComposite, SWT.BORDER);
+ sourceSRPM.setToolTipText(Messages.getString(
+ "SRPMImportPage.toolTip_SRPM_Name")); //$NON-NLS-1$
+
+ if (srpmVector == null)
+ srpmVector = new Vector<String>();
+ for (int i = srpmVector.size(); i > 0; i--)
+ sourceSRPM.add((srpmVector.elementAt(i - 1)));
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ sourceSRPM.setLayoutData(gridData);
+ sourceSRPM.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ handleEvent(null);
+ }
+ });
+
+ Button srpmBrowse = new Button(sourceSpecComposite, SWT.PUSH);
+ srpmBrowse.setToolTipText(Messages.getString(
+ "SRPMImportPage.toolTip_Open_file_navigator")); //$NON-NLS-1$
+ srpmBrowse.setText(Messages.getString("RPMPage.Browse")); //$NON-NLS-1$
+ srpmBrowse.addListener(SWT.Selection,
+ new Listener() {
+ public void handleEvent(Event event) {
+ FileDialog srpmBrowseDialog = new FileDialog(getContainer()
+ .getShell(), SWT.OPEN);
+ String selectedSRPM_name = srpmBrowseDialog.open();
+ if (selectedSRPM_name != null)
+ {
+ File testSRPMfilename = new File(selectedSRPM_name);
+ if (testSRPMfilename.isFile())
+ sourceSRPM.setText(selectedSRPM_name);
+ }
+ }
+ });
+ srpmBrowse.addListener(SWT.FocusOut, this);
+ }
+
+ /**
+ * Method createProjectBox.
+ * @param parent - parent widget
+ *
+ * Create a list box and populate it with
+ * the list of current projects in the workspace
+ * along with adding the option for a configured project
+ */
+ private void createProjectBox(Composite parent) {
+ // Creates a control that enumerates all the projects in the current
+ // Workspace and places them in a listbox.
+ // Give the option of importing into an existing project or creating a new one
+
+ // Declare an array of IProject;
+ IProject[] internalProjectList;
+
+ //Get the current workspace root.
+ final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace()
+ .getRoot();
+
+ // Create a group and set up the layout, we want to seperate
+ // project selection from the other widgets on the wizard dialog box
+ Group group = new Group(parent, SWT.NONE);
+ group.setLayout(new GridLayout());
+ group.setText(Messages.getString("SRPMImportPage.import_srpm_into")); //$NON-NLS-1$
+ group.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+ intoExisting = new Button(group, SWT.RADIO);
+ intoExisting.setText(Messages.getString("RPMPage.Select_a_project")); //$NON-NLS-1$
+
+ // Create a new SWT listbox. Only allow single selection of items
+ // Set up the layout data
+ projectList = new List(group, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
+ projectList.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+ projectList.setToolTipText(Messages.getString(
+ "SRPMImportPage.toolTip_project_destination")); //$NON-NLS-1$
+
+ intoConfigured = new Button(group, SWT.RADIO);
+ intoConfigured.setText(Messages.getString("SRPMImportPage.Configured_New_Project")); //$NON-NLS-1$
+
+ // Set the height to 4 elements high
+ GridData projectLayout = new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL);
+ projectLayout.heightHint = projectList.getItemHeight() * 4;
+ projectList.setLayoutData(projectLayout);
+
+ // From the current Workspace root, get a list of all current projects
+ // This should come back to us as an array of IProject.
+ internalProjectList = workspaceRoot.getProjects();
+
+ // Stuff the listbox with the text name of the projects
+ // using the getName() method
+ // Find the first selected project in the workspace
+
+ Iterator iter = selection.iterator();
+ Object selectedObject= null;
+ IProject selectedProject = null;
+ boolean isSelection = false;
+ if (iter.hasNext())
+ {
+ selectedObject = iter.next();
+ if (selectedObject instanceof IResource)
+ {
+ selectedProject = ((IResource) selectedObject).getProject();
+ isSelection = true;
+ }
+ }
+
+ // Stuff the listbox with the text names of the projects
+ // using the getName() method and select the selected
+ // project if available
+
+ for (int a = 0; a < internalProjectList.length; a++)
+ {
+ projectList.add(internalProjectList[a].getName());
+ if (isSelection && internalProjectList[a].equals(selectedProject)) {
+ projectList.setSelection(a);
+ }
+ }
+
+ if (projectList.getItemCount() == 0) //there were no projects
+ {
+ projectList.add(Messages.getString(
+ "SRPMImportPage.No_projects_found")); //$NON-NLS-1$
+ intoExisting.setEnabled(false); // Can't very well import into an existing
+ projectList.setEnabled(false); // project now can we?
+ intoConfigured.setSelection(true);
+ isSelection = true; // we don't want select the "RPMPage.No_c/c++_projects_found_2"
+ }
+ else {
+ intoExisting.setSelection(true);
+ }
+
+ if (!isSelection) { //if none is selected select first project
+ projectList.setSelection(0);
+ }
+ else {
+ projectList.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ handleEvent(null);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ intoExisting.addListener(SWT.Selection, this);
+ intoConfigured.addListener(SWT.Selection, this);
+ projectList.addListener(SWT.FocusOut, this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
+ */
+ public void handleEvent(Event event) {
+ if (event != null)
+ {
+ if (event.widget == intoExisting && intoExisting.getSelection())
+ {
+ projectList.setEnabled(true);
+ }
+ else if (event.widget == intoConfigured && intoConfigured.getSelection())
+ {
+ projectList.setEnabled(false);
+ }
+ }
+ setPageComplete(canFinish());
+ }
+
+
+ /**
+ * canFinish()
+ *
+ * Hot validation. Called to determine whether Finish
+ * button can be set to true
+ * @return boolean. true if finish can be activated
+ */
+ public boolean canFinish() {
+ // Make sure project has been selected or the user
+ // has decided to configure a new one instead
+ if (getSelectedProjectName() == null && !intoConfigured.getSelection()) {
+ return false;
+ }
+
+ // Make sure an srpm name has been provided
+ if (sourceSRPM.getText().equals("")) { //$NON-NLS-1$
+ return false;
+ }
+ File srpm = new File(sourceSRPM.getText());
+ if (!srpm.isFile()){
+ setErrorMessage(Messages.getString("SRPMImportPage.Source_not_Valid")); //$NON-NLS-1$
+ return false;
+ }
+ if (sourceSRPM.getText().lastIndexOf(".src.rpm") == -1) //$NON-NLS-1$
+ {
+ setErrorMessage(Messages.getString("SRPMImportPage.No_src_rpm_ext")); //$NON-NLS-1$
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * finish()
+ *
+ * Perform finish after finish button is pressed
+ * @return boolean
+ * @throws CoreException
+ * */
+ public boolean finish() throws CoreException {
+ IProject detailedProject;
+
+ // Get the handle to the current activate Workspace
+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+
+ // User chooses an existing project or make a new project
+ if (intoExisting.getSelection()) {
+ // Get the current selected member from the list box (projectList)
+ String[] selectedProject = projectList.getSelection();
+
+ // As we only allow a single selection in the listbox, and the listbox always
+ // comes with the first element selected, we can assume the first element
+ // in the returned array is valid.
+ detailedProject = workspaceRoot.getProject(selectedProject[0]);
+ }
+ else {
+ detailedProject = getNewProject();
+ if(detailedProject == null) {
+ return false;
+ }
+ }
+ // Add this SRPM to srpmList
+ for (int i = 0; i < srpmVector.size(); i++)
+ { // There can only be one occurance
+ if (srpmVector.elementAt(i).equals(sourceSRPM.getText()))
+ {
+ srpmVector.remove(i);
+ break;
+ }
+ }
+ srpmVector.add((sourceSRPM.getText()));
+
+ SRPMImportOperation srpmImportOp = null;
+ try {
+ srpmImportOp = new SRPMImportOperation(detailedProject,
+ getSelectedSRPM());
+ getContainer().run(true, true, srpmImportOp);
+ } catch (Exception e) {
+ setErrorMessage(e.toString());
+ return false;
+ }
+
+ // Get the status of the operation
+ IStatus srpmImportStatus = srpmImportOp.getStatus();
+
+ // If the status does not come back clean, open error dialog
+ if (!srpmImportStatus.isOK()) {
+ ErrorDialog.openError(getContainer().getShell(),
+ Messages.getString("SRPMImportPage.Errors_importing_SRPM"), //$NON-NLS-1$
+ null, // no special message
+ srpmImportStatus);
+
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Get a new project that is configured by the new project wizard. This is
+ * currently the only way to do this. This is a copy of
+ * org.eclipse.team.internal.ccvs.ui.wizards.CheckoutAsWizard.getNewProject()
+ */
+ private IProject getNewProject() {
+ NewProjectListener listener = new NewProjectListener();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(listener,
+ IResourceChangeEvent.POST_CHANGE);
+ RPMNewProject wizard = new RPMNewProject();
+ wizard.init(PlatformUI.getWorkbench(), null);
+ // Instantiates the wizard container with the wizard and opens it
+ WizardDialog dialog = new WizardDialog(getShell(), wizard);
+ dialog.create();
+ dialog.open();
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(listener);
+ IProject project = listener.getNewProject();
+ return project;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportWizard.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportWizard.java
new file mode 100644
index 0000000000..8c1ac94b83
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportWizard.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui;
+
+import org.eclipse.core.runtime.CoreException;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+/**
+ * Plug-in entry point. When the user chooses to import an RPM the plug-in manager in Eclipse
+ * will invoke this class. This class extends Wizard and implements IImportWizard.
+ * The main plugin class to be used in the desktop. This is the "entrypoint"
+ * for the import rpm plug-in.
+ */
+public class SRPMImportWizard extends Wizard implements IImportWizard {
+ private IWorkbench workbench;
+ private IStructuredSelection selection;
+ private SRPMImportPage mainPage;
+
+ /**
+ * @see org.eclipse.ui.IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
+ this.workbench = workbench;
+ selection = currentSelection;
+ setWindowTitle(Messages.getString("SRPMImportwizard.Import_an_SRPM")); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * @see org.eclipse.jface.wizard.IWizard#performFinish()
+ */
+
+ // We have elected to do the Finish button clickin in the SRPMImportPage. So override
+ //the default and point to SRPMImport finish()
+ @Override
+ public boolean performFinish() {
+ try {
+ return mainPage.finish();
+ } catch (CoreException e) {
+ return false;
+ }
+ }
+
+ /**
+ * @see org.eclipse.jface.wizard.IWizard#canFinish()
+ *
+ * Select to finish validation in the SRPMImportPage
+ */
+ @Override
+ public boolean canFinish() {
+ return mainPage.canFinish();
+ }
+
+ /**
+ * @see org.eclipse.jface.wizard.IWizard#addPages()
+ */
+
+ // Add the SRPMImportPage as the only page in this wizard.
+ @Override
+ public void addPages() {
+ mainPage = new SRPMImportPage(workbench, selection);
+ addPage(mainPage);
+ super.addPages();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java
new file mode 100644
index 0000000000..fc2281d207
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public class ChangelogPage extends PropertyPage {
+
+ private static final String RPM_CHANGELOG_ENTRIES = Messages
+ .getString("ChangelogPage.entries"); //$NON-NLS-1$
+
+ private static final int CL_ENTRIES_FIELD_WIDTH = 80;
+
+ private static final int CL_ENTRIES_FIELD_HEIGHT = 50;
+
+ private Text rpm_ChangelogEntriesText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public ChangelogPage() {
+ super();
+ }
+
+ private void addChangelogField(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmChangelogEntriesLabel = new Label(composite, SWT.NONE);
+ rpmChangelogEntriesLabel.setText(RPM_CHANGELOG_ENTRIES);
+ rpm_ChangelogEntriesText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdEntries = new GridData();
+ gdEntries.widthHint = convertWidthInCharsToPixels(CL_ENTRIES_FIELD_WIDTH);
+ gdEntries.heightHint = convertWidthInCharsToPixels(CL_ENTRIES_FIELD_HEIGHT);
+ rpm_ChangelogEntriesText.setLayoutData(gdEntries);
+
+ try {
+ String rpm_ChangelogEntries = RPMQuery
+ .getChangelog((IFile) getElement());
+ rpm_ChangelogEntriesText.setText(rpm_ChangelogEntries);
+ } catch (CoreException e) {
+ StatusManager.getManager().handle(new StatusAdapter(e.getStatus()),
+ StatusManager.LOG | StatusManager.SHOW);
+ }
+
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addChangelogField(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java
new file mode 100644
index 0000000000..28b2ad4ab3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public class InstallScriptsPage extends PropertyPage {
+
+ private static final String RPM_PRE_INSTALL = Messages
+ .getString("InstallScriptsPage.PreinstallScript"); //$NON-NLS-1$
+
+ private static final String RPM_POST_INSTALL = Messages
+ .getString("InstallScriptsPage.PostinstallScript"); //$NON-NLS-1$
+
+ private static final String RPM_PRE_UNINSTALL = Messages
+ .getString("InstallScriptsPage.PreuninstallScript"); //$NON-NLS-1$
+
+ private static final String RPM_POST_UNINSTALL = Messages
+ .getString("InstallScriptsPage.PostuninstallScript"); //$NON-NLS-1$
+
+ private static final int SCRIPT_ENTRIES_FIELD_WIDTH = 80;
+
+ private static final int SCRIPT_ENTRIES_FIELD_HEIGHT = 20;
+
+ private Text rpm_PreInstallText;
+
+ private Text rpm_PostInstallText;
+
+ private Text rpm_PreUnInstallText;
+
+ private Text rpm_PostUnInstallText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public InstallScriptsPage() {
+ super();
+ }
+
+ private void addScriptFields(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmPreInstallLabel = new Label(composite, SWT.NONE);
+ rpmPreInstallLabel.setText(RPM_PRE_INSTALL);
+ rpm_PreInstallText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdPreInst = new GridData();
+ gdPreInst.widthHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_WIDTH);
+ gdPreInst.heightHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_HEIGHT);
+ rpm_PreInstallText.setLayoutData(gdPreInst);
+
+ Label rpmPostInstallLabel = new Label(composite, SWT.NONE);
+ rpmPostInstallLabel.setText(RPM_POST_INSTALL);
+ rpm_PostInstallText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdPostInst = new GridData();
+ gdPostInst.widthHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_WIDTH);
+ gdPostInst.heightHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_HEIGHT);
+ rpm_PostInstallText.setLayoutData(gdPostInst);
+
+ Label rpmPreUnInstallLabel = new Label(composite, SWT.NONE);
+ rpmPreUnInstallLabel.setText(RPM_PRE_UNINSTALL);
+ rpm_PreUnInstallText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdPreUnInst = new GridData();
+ gdPreUnInst.widthHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_WIDTH);
+ gdPreUnInst.heightHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_HEIGHT);
+ rpm_PreUnInstallText.setLayoutData(gdPreUnInst);
+
+ Label rpmPostUnInstallLabel = new Label(composite, SWT.NONE);
+ rpmPostUnInstallLabel.setText(RPM_POST_UNINSTALL);
+ rpm_PostUnInstallText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdPostUnInst = new GridData();
+ gdPostUnInst.widthHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_WIDTH);
+ gdPostUnInst.heightHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_HEIGHT);
+ rpm_PostUnInstallText.setLayoutData(gdPostUnInst);
+
+ // Populate RPM text fields
+ try {
+ IFile rpmFile = (IFile) getElement();
+ String rpm_PreInstall = RPMQuery.getPreInstallScript(rpmFile);
+ rpm_PreInstallText.setText(rpm_PreInstall);
+
+ String rpm_PostInstall = RPMQuery.getPostInstallScript(rpmFile);
+ rpm_PostInstallText.setText(rpm_PostInstall);
+
+ String rpm_PreUnInstall = RPMQuery.getPreUninstallScript(rpmFile);
+ rpm_PreUnInstallText.setText(rpm_PreUnInstall);
+
+ String rpm_PostUnInstall = RPMQuery.getPostUninstallScript(rpmFile);
+ rpm_PostUnInstallText.setText(rpm_PostUnInstall);
+ } catch (CoreException e) {
+ StatusManager.getManager().handle(new StatusAdapter(e.getStatus()),
+ StatusManager.LOG | StatusManager.SHOW);
+ }
+
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addScriptFields(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java
new file mode 100644
index 0000000000..b387ee91c2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2005-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.propertypage.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java
new file mode 100644
index 0000000000..4aa1447f1a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public class ProvidesPage extends PropertyPage {
+
+ private static final String RPM_QL = Messages
+ .getString("ProvidesPage.Provides"); //$NON-NLS-1$
+
+ private static final int QL_FIELD_WIDTH = 80;
+
+ private static final int QL_FIELD_HEIGHT = 40;
+
+ private Text rpm_qlText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public ProvidesPage() {
+ super();
+ }
+
+ private void addProvidesField(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmDescriptionLabel = new Label(composite, SWT.NONE);
+ rpmDescriptionLabel.setText(RPM_QL);
+ rpm_qlText = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.READ_ONLY
+ | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdQL = new GridData();
+ gdQL.widthHint = convertWidthInCharsToPixels(QL_FIELD_WIDTH);
+ gdQL.heightHint = convertWidthInCharsToPixels(QL_FIELD_HEIGHT);
+ rpm_qlText.setLayoutData(gdQL);
+
+ // Populate RPM text fields
+ try {
+ String rpm_ql = RPMQuery.getProvides((IFile) getElement());
+ rpm_qlText.setText(rpm_ql);
+ } catch (CoreException e) {
+ StatusManager.getManager().handle(new StatusAdapter(e.getStatus()),
+ StatusManager.LOG | StatusManager.SHOW);
+ }
+
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addProvidesField(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java
new file mode 100644
index 0000000000..eceacc0701
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public class SpecFileHeaderPage extends PropertyPage {
+
+ private static final String RPM_QI = Messages
+ .getString("SpecFileHeaderPage.info"); //$NON-NLS-1$
+
+ private static final int QI_FIELD_WIDTH = 80;
+
+ private static final int QI_FIELD_HEIGHT = 40;
+
+ private Text rpm_qiText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public SpecFileHeaderPage() {
+ super();
+ }
+
+ private void addInfoField(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmDescriptionLabel = new Label(composite, SWT.NONE);
+ rpmDescriptionLabel.setText(RPM_QI);
+ rpm_qiText = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.READ_ONLY
+ | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdQI = new GridData();
+ gdQI.widthHint = convertWidthInCharsToPixels(QI_FIELD_WIDTH);
+ gdQI.heightHint = convertWidthInCharsToPixels(QI_FIELD_HEIGHT);
+ rpm_qiText.setLayoutData(gdQI);
+
+ // Populate RPM text field
+ try {
+ String rpm_qi = RPMQuery.getHeaderInfo((IFile) getElement());
+ rpm_qiText.setText(rpm_qi);
+ } catch (CoreException e) {
+ StatusManager.getManager().handle(new StatusAdapter(e.getStatus()),
+ StatusManager.LOG | StatusManager.SHOW);
+ }
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addInfoField(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java
new file mode 100644
index 0000000000..78d95e45f1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public class TargetPage extends PropertyPage {
+
+ private static final String RPM_ARCH = Messages
+ .getString("TargetPage.Architecture"); //$NON-NLS-1$
+
+ private static final String RPM_PLATFORM = Messages
+ .getString("TargetPage.Platform"); //$NON-NLS-1$
+
+ private static final String RPM_OS = Messages.getString("TargetPage.OS"); //$NON-NLS-1$
+
+ private static final String RPM_HOST = Messages
+ .getString("TargetPage.BuildHost"); //$NON-NLS-1$
+
+ private static final String RPM_TIME = Messages
+ .getString("TargetPage.BuildTime"); //$NON-NLS-1$
+
+ private static final int ARCH_FIELD_WIDTH = 8;
+
+ private static final int PLATFORM_FIELD_WIDTH = 20;
+
+ private static final int OS_FIELD_WIDTH = 10;
+
+ private static final int HOST_FIELD_WIDTH = 40;
+
+ private static final int TIME_FIELD_WIDTH = 35;
+
+ private Label rpm_archText;
+
+ private Label rpm_platformText;
+
+ private Label rpm_osText;
+
+ private Label rpm_hostText;
+
+ private Label rpm_timeText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public TargetPage() {
+ super();
+ }
+
+ private void addTargetFields(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmArchLabel = new Label(composite, SWT.NONE);
+ rpmArchLabel.setText(RPM_ARCH);
+ rpm_archText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdArch = new GridData();
+ gdArch.widthHint = convertWidthInCharsToPixels(ARCH_FIELD_WIDTH);
+ rpm_archText.setLayoutData(gdArch);
+
+ Label rpmPlatformLabel = new Label(composite, SWT.NONE);
+ rpmPlatformLabel.setText(RPM_PLATFORM);
+ rpm_platformText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdPlatform = new GridData();
+ gdPlatform.widthHint = convertWidthInCharsToPixels(PLATFORM_FIELD_WIDTH);
+ rpm_platformText.setLayoutData(gdPlatform);
+
+ Label rpmOSLabel = new Label(composite, SWT.NONE);
+ rpmOSLabel.setText(RPM_OS);
+ rpm_osText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdOS = new GridData();
+ gdOS.widthHint = convertWidthInCharsToPixels(OS_FIELD_WIDTH);
+ rpm_osText.setLayoutData(gdOS);
+
+ Label rpmHostLabel = new Label(composite, SWT.NONE);
+ rpmHostLabel.setText(RPM_HOST);
+ rpm_hostText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdHost = new GridData();
+ gdHost.widthHint = convertWidthInCharsToPixels(HOST_FIELD_WIDTH);
+ rpm_hostText.setLayoutData(gdHost);
+
+ Label rpmTimeLabel = new Label(composite, SWT.NONE);
+ rpmTimeLabel.setText(RPM_TIME);
+ rpm_timeText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdTime = new GridData();
+ gdTime.widthHint = convertWidthInCharsToPixels(TIME_FIELD_WIDTH);
+ rpm_timeText.setLayoutData(gdTime);
+
+ // Populate RPM text fields
+ try {
+ IFile rpmFile = (IFile) getElement();
+ String rpm_arch = RPMQuery.getArch(rpmFile);
+ rpm_archText.setText(rpm_arch);
+ String rpm_platform = RPMQuery.getPlatform(rpmFile);
+ rpm_platformText.setText(rpm_platform);
+ String rpm_os = RPMQuery.getOS(rpmFile);
+ rpm_osText.setText(rpm_os);
+ String rpm_host = RPMQuery.getBuildHost(rpmFile);
+ rpm_hostText.setText(rpm_host);
+ String rpm_time = RPMQuery.getBuildTime(rpmFile);
+ rpm_timeText.setText(rpm_time);
+ } catch (CoreException e) {
+ StatusManager.getManager().handle(new StatusAdapter(e.getStatus()),
+ StatusManager.LOG | StatusManager.SHOW);
+ }
+
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addTargetFields(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties
new file mode 100644
index 0000000000..0b39b34946
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# 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 - initial API and implementation
+###############################################################################
+SpecFileHeaderPage.info=Header Information:
+ChangelogPage.entries=ChangeLog Entries:
+TargetPage.Architecture=Architecture:
+TargetPage.Platform=Platform:
+TargetPage.OS=OS Target:
+TargetPage.BuildHost=Build Host:
+TargetPage.BuildTime=Build Time:
+InstallScriptsPage.PreinstallScript=Pre-install script:
+InstallScriptsPage.PostinstallScript=Post-install script:
+InstallScriptsPage.PreuninstallScript=Pre-uninstall script:
+InstallScriptsPage.PostuninstallScript=Post-uninstall script:
+ProvidesPage.Provides=Files Provided:
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/redhat-system_tools.png b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/redhat-system_tools.png
new file mode 100644
index 0000000000..0cc5d06549
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/redhat-system_tools.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/rpm_strings.properties b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/rpm_strings.properties
new file mode 100644
index 0000000000..1e9d63503b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/rpm_strings.properties
@@ -0,0 +1,174 @@
+###############################################################################
+# Copyright (c) 2004, 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 - initial API and implementation
+###############################################################################
+RPMExportOperation.Cannot_invoke_core_rpmbuild_class=Cannot invoke the core rpm build class
+RPMExportOperation.Makefile_exists_check=Checking existence of Makefile/makefile
+RPMExportOperation.Create_RPM_directories=Creating RPM directories
+RPMExportOperation.Create_.rpmrc_RPM_resource=Creating .rpmrc RPM resource file
+RPMExportOperation.Creat_.rpmmacro_RPM_resource=Creating .rpmmacro RPM resource file
+RPMExportOperation.Replicate_project_dir=Replicating project directory
+RPMExportOperation.Setting_RPM_spec=Setting RPM spec file
+RPMExportOperation.Retrieving_RPM_info=Retrieving RPM info
+RPMExportOperation.Installing_previous_SRPM_source=Installing previous SRPM source
+RPMExportOperation.Executing_Build_Preparation=Executing Build Preparation
+RPMExportOperation.Modifying_Spec_File=Modifying Spec File
+RPMExportOperation.Generating_patch=Generating patch
+RPMExportOperation.Creating_new_SPEC_file=Creating new SPEC file
+RPMExportOperation.Create_RPM_Tar_file=Create RPM Tar file
+RPMExportOperation.Creating_the_RPM_binary=Creating the RPM binary
+RPMExportOperation.Starting_task=Starting ...
+RPMExportOperation.Cleaning_up_RPM_workarea=Cleaning up RPM work area
+RPMExportOperation.Export_RPM_errors=Export RPM errors
+
+RPMExportPage.0=No RPM project found in the selection
+RPMExportPage.Export_an_RPM=Export an RPM
+RPMExportPage.Makefile_pc=Makefile
+RPMExportPage.Makefile_lc=makefile
+RPMExportPage.specify_version_and_release_if_SPEC_file_not_provided=You must specify a version and release if a SPEC file is not provided
+RPMExportPage.selected_project_does_not_have_Makefile=The selected project does not have a Makefile
+RPMExportPage.Cannont_find_file=Cannot find the file:
+RPMExportPage.Core_Exception=Core Exception:
+RPMExportPage.SPEC_file=SPEC file
+RPMExportPage.Version=Version:
+RPMExportPage.Release=\ \ Release:
+RPMExportPage.project_to_export_to_RPM=Select a project to export to RPM
+RPMExportPage.No_c/c++_projects_found=---> No c/c++ projects found <--
+RPMExportPage.Invald_project_specified_(not_c/c++)=Invald project specified (not_c/c++)
+RPMExportPage.Select_project=Select a project
+RPMExportPage.No_c/c++_projects_found_2=---> No c/c++ projects found <---
+RPMExportPage.Binary_RPM_filename=Binary RPM filename
+RPMExportPage.Preserve_RPM_environment=Preserve RPM build environment
+RPMExportPage.Gen_build_log_file=Generate build output log file
+RPMExportPage.Composite_Export_Type=Composite Export Type
+RPMExportPage.Export_Binary=Export a Binary RPM
+RPMExportPage.Export_Source=Export a Source RPM
+RPMExportPage.Fill_in_ver_rel=Specify version and release information
+RPMExportPage.Invalid_ver_rel=Invalid version or release
+RPMExportPage.Select_export_type=Select export type(s)
+RPMExportPage.Select_spec_file=Select a spec file
+RPMExportPage.Not_in_specs=Spec file must be in SPECS folder
+RPMExportPage.Spec_file_does_not_exist=Selected spec file does not exist
+
+
+RPMexportwiz.Export_an_RPM_title=Export an RPM
+
+SRPMImportPage.Configured_New_Project=Import into project &configured using the New RPM Project Wizard
+SRPMImportPage.Project_does_not_exist=Project does not exist. Please select a project
+SRPMImportPage.Problems_identifying_import_source_directory=Problems identifying import source directory
+SRPMImportPage.SRPM_Name=SRPM
+SRPMImportPage.Import_SRPM=Import SRPM
+SRPMImportPage.Select_project_to_import=Select a project to import an SRPM into
+SRPMImportPage.No_objects_selected_to_be_imported=No objects have been selected to be imported
+SRPMImportPage.Errors_importing_SRPM=Errors encountered importing the SRPM
+SRPMImportPage.Preserve_SRPM_envionment=Preserve SRPM envionment
+SRPMImportPage.Create_logfile_operations=Create a logfile of operations
+SRPMImportPage.Browse=Browse...
+SRPMImportPage.Errors_importing_SRPM=Errors encountered importing the SRPM
+SRPMImportPage.Errors_importing_SRPM_2=Errors encountered importing the SRPM
+SRPMImportPage.ApplyPatches=Apply all patches to pristine source
+SRPMImportPage.runAutoConf=Run AutoConf (configure) if applicable
+SRPMImportPage.preserveRPMenvironment=Preserve RPM environment
+SRPMImportPage.Source_not_Valid=Source File is not a valid file
+SRPMImportPage.No_src_rpm_ext=Filename does not have src.rpm extension
+SRPMImportPage.Build_Options=Build Options
+SRPMImportPage.import_srpm_into=Import SRPM into...
+SRPMImportwizard.Import_an_SRPM=Import an SRPM
+SRPMImportPage.No_projects_found=No projects found
+
+
+SRPMImportPage.toolTip_ApplyPatches=Typically, an SRPM is comprised of a source tarball\nand a set of patches that are applied to that tarball.\nTherefore changes are made to the SRPM in the form of\npatches, while leaving the original source 'pristine'\n\nThis option allows you to import the unpatched\n'pristine' source code, and not apply patches
+SRPMImportPage.toolTip_runAutoConf=Many projects use autoconf to create their\nbuild environments automatically. Typically,\nthis is done by running the 'configure' script that\ncreates, among other things, a Makefile\n\nClick this option to run the configure step if this\nis an autoconf project
+SRPMImportPage.toolTip_preserveEnv=Click to preserve the RPM environment after import\nThis option is normally only used for debugging.
+SRPMImportPage.toolTip_genLog=Click to generate a log of the import process
+SRPMImportPage.toolTip_SRPM_Name=Name of SRPM file to import into a project
+SRPMImportPage.toolTip_Open_file_navigator=Click to open a file navigator to select an SRPM file
+SRPMImportPage.toolTip_project_destination=Select a project as a destination for the imported SRPM files
+
+RPMExportOperation.Starting=Starting ...
+RPMExportOperation.0=Error message not defined
+RPMExportOperation.Open_SRPM_Errors=Export RPM Errors
+RPMExportOperation.Starting_SRPM_Export=Starting SRPM Export Operation
+RPMExportOperation.Executing_SRPM_Export=Executing SRPM Export
+RPMExportOperation.Starting_RPM_Export=Starting RPM Export Operation
+RPMExportOperation.Executing_RPM_Export=Executing RPM Export
+
+RPMExportPage.Export_SRPM=Export SRPM
+RPMExportPage.Export_SRPM_from_project=Export an SRPM from a project
+RPMExportPage.Select_project_export=Select a project to export
+RPMExportPage.Makefile_pc=Makefile
+RPMExportPage.makefile_lc=makefile
+RPMExportPage.project_does_not_have_Makefile=The selected project does not have a Makefile
+RPMExportPage.No_c/c++_projects_found=---> No c/c++ projects found <---
+RPMExportPage.Invald_project_specified=Invald project specified (not c/c++)
+RPMExportPage.Patch_must_have_name=Patch must have a name
+RPMExportPage.must_supply_version_number=You must supply a version number
+RPMExportPage.must_supply_release_number=You must supply a release number
+RPMExportPage.version_or_release_change=Either version or release must change for exporting
+RPMExportPage.Patch_have_descriptive_tag=Patch must have a short descriptive tag
+RPMExportPage.Patch_tag_cannot_have_spaces=Patch tag cannot have any spaces
+RPMExportPage.Patch_must_have_changelog=Patch must have a changelog entry
+RPMExportPage.Errors_encountered_importing_SRPM=Errors encountered importing the SRPM
+RPMExportPage.SPEC_file=SPEC file
+RPMExportPage_2.0=Enter patch/changelog information for spec file
+RPMExportPage_2.1=Patch name contains invalid character(s)
+RPMExportPage_2.2=Enter patch/changelog information for spec file
+RPMExportPage_2.3=Patch name is not unique
+RPMExportPage_2.4=Enter changelog entry info
+RPMExportPage_2.5=Enter a patch name
+RPMExportPage.Generate_patch=Generate patch (against previously imported SRPM)
+RPMExportPage.YourName=YourName
+RPMExportPage.your@mail.com=mail.com
+RPMExportPage.Patch_Options=Patch Options
+RPMExportPage.Patch_Name=Patch Name:
+RPMExportPage.Patch_Tag=Patch Tag
+RPMExportPage.Patch_Changelog_Stamp=Changelog Date Stamp:
+RPMExportPage.Patch_Changelog=Changelog Comment:
+RPMExportPage.Version=\ \Version:
+RPMExportPage.Release=\ \Release:
+RPMExportPage.RPM_Export_Filename=RPM Export Filename
+RPMExportPage.groupPatchTitle=Patch Needed
+RPMExportPage.needPatch_Project=The project
+RPMExportPage.needPatch_desc=\ has changed since last imported as an SRPM. To continue export\nas an SRPM, you will have to generate a patch (on the next page)
+
+
+RPMExportPage.toolTip_Export_Binary=Enable to export a Binary RPM
+RPMExportPage.toolTip_Export_Source=Enable to export a source RPM
+RPMExportPage.toolTip_Select_a_project=Select a project as a source for the exported RPM/SRPM
+RPMExportPage.toolTip_SpecFile=Select an RPM SPEC file to export the project.\nA list of SPEC files found in the project are already placed in the combo box,\nor choose another SPEC file using the Browse button.
+RPMExportPage.toolTip_file_navigator=Click to open a file navigator to select an external SPEC file
+RPMExportPage.toolTip_Version=The Version associated with this RPM.\nChange the version here to change the\nversion of the RPM.
+RPMExportPage.toolTip_Release=The Release associated with this RPM.\nChange the release here to change the release number of the RPM.
+RPMExportPage.toolTip_Patch_Name=Patch Name - unique identifier for the patch.
+RPMExportPage.toolTip_Changelog_Stamp=Changelog Date - Date stamp for the changelog entry. \n\nExample: * Wed Oct 12 2003 -- John Doe <jdoe@redhat.com>
+RPMExportPage.toolTip_Changelog=Changelog Comment - short descriptive summary of change made in patch\n\nExample: - Fixed bugzilla entry #125642
+
+RPMPage.Browse=Browse...
+RPMPage.Select_a_project=Select a project ...
+RPMPage.No_RPM_projects_found=No RPM projects found
+
+
+RPMExportWizard.0=Exporting RPM/SRPM...
+RPMExportWizard.Export_an_SRPM=Export an SRPM
+
+SRPMImportOperation.Starting=Starting ...
+SRPMImportOperation.import=import
+SRPMImportOperation.0=Error message not defined
+SRPMImportOperation.1=Undefined Error\!
+SRPMImportOperation.2=Undefined Error\!
+SRPMImportOperation.3=Source RPM Import Error
+SRPMImportOperation.Open_SRPM_Errors=Import SRPM Errors=
+SRPMImportOperation.Importing_SRPM=Importing SRPM
+
+ExceptionDialog.seeErrorLogMessage=An exception occurred. See error log for details.
+ErrorDialog.title=Error
+
+RPMNewProject.0=New RPM Project
+RPMNewProject.1=Create a new RPM project
+RPMNewProject.2=Created project will have a standard rpmbuild structure. \ No newline at end of file

Back to the top