Index: plugin.xml =================================================================== RCS file: /home/tools/org.eclipse.cdt-contrib/org.eclipse.cdt.rpm/org.eclipse.cdt.rpm.ui/plugin.xml,v retrieving revision 1.5 diff -u -r1.5 plugin.xml --- plugin.xml 18 May 2005 21:13:08 -0000 1.5 +++ plugin.xml 19 May 2005 17:35:18 -0000 @@ -78,4 +78,43 @@ name="RPM"> + + + + + + + + + + + + + Index: .settings/org.eclipse.core.resources.prefs =================================================================== RCS file: .settings/org.eclipse.core.resources.prefs diff -N .settings/org.eclipse.core.resources.prefs --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .settings/org.eclipse.core.resources.prefs 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,3 @@ +#Thu May 19 09:50:34 GMT-05:00 2005 +eclipse.preferences.version=1 +encoding//src/org/eclipse/cdt/rpm/ui/propertypage/messages.properties=8859_1 Index: src/org/eclipse/cdt/rpm/ui/propertypage/ChangelogPage.java =================================================================== RCS file: src/org/eclipse/cdt/rpm/ui/propertypage/ChangelogPage.java diff -N src/org/eclipse/cdt/rpm/ui/propertypage/ChangelogPage.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/cdt/rpm/ui/propertypage/ChangelogPage.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,108 @@ +/* + * (c) 2004, 2005 Red Hat, Inc. + * + * This program is open source software licensed under the + * Eclipse Public License ver. 1 + */ + +package org.eclipse.cdt.rpm.ui.propertypage; + +import org.eclipse.cdt.rpm.core.utils.RPMQuery; +import org.eclipse.cdt.rpm.ui.util.ExceptionHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.preference.PreferencePage; +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; + +public class ChangelogPage extends PropertyPage { + + private static final String RPM_CHANGELOG_ENTRIES = + Messages.getString("ChangelogPage.entries"); //$NON-NLS-1$ + + private static final int NAME_FIELD_WIDTH = 20; + + private static final int CL_ENTRIES_FIELD_WIDTH = 80; + + private static final int CL_ENTRIES_FIELD_HEIGHT = 50; + + private Text rpm_nameText; + + 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) { + ExceptionHandler.handle(e, getShell(), + Messages.getString("ErrorDialog.title"), e.getMessage()); + } + + } + + /** + * @see PreferencePage#createContents(Composite) + */ + 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; + } + + protected void performDefaults() { + + } + + public boolean performOk() { + + return true; + } + +} Index: src/org/eclipse/cdt/rpm/ui/propertypage/InstallScriptsPage.java =================================================================== RCS file: src/org/eclipse/cdt/rpm/ui/propertypage/InstallScriptsPage.java diff -N src/org/eclipse/cdt/rpm/ui/propertypage/InstallScriptsPage.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/cdt/rpm/ui/propertypage/InstallScriptsPage.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,157 @@ +/* + * (c) 2004, 2005 Red Hat, Inc. + * + * This program is open source software licensed under the + * Eclipse Public License ver. 1 + */ + +package org.eclipse.cdt.rpm.ui.propertypage; + +import org.eclipse.cdt.rpm.core.utils.RPMQuery; +import org.eclipse.cdt.rpm.ui.util.ExceptionHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.preference.PreferencePage; +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; + +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 NAME_FIELD_WIDTH = 20; + + private static final int SCRIPT_ENTRIES_FIELD_WIDTH = 80; + + private static final int SCRIPT_ENTRIES_FIELD_HEIGHT = 20; + + private Text rpm_nameText; + + 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) { + ExceptionHandler.handle(e, getShell(), + Messages.getString("ErrorDialog.title"), e.getMessage()); + } + + } + + /** + * @see PreferencePage#createContents(Composite) + */ + 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; + } + + protected void performDefaults() { + + } + + public boolean performOk() { + + return true; + } + +} Index: src/org/eclipse/cdt/rpm/ui/propertypage/Messages.java =================================================================== RCS file: src/org/eclipse/cdt/rpm/ui/propertypage/Messages.java diff -N src/org/eclipse/cdt/rpm/ui/propertypage/Messages.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/cdt/rpm/ui/propertypage/Messages.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,30 @@ +/* + * (c) 2005 Red Hat, Inc. + * + * This program is open source software licensed under the + * Eclipse Public License ver. 1 + */ + +package org.eclipse.cdt.rpm.ui.propertypage; + +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +public class Messages { + private static final String BUNDLE_NAME = "org.eclipse.cdt.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) { + // TODO Auto-generated method stub + try { + return RESOURCE_BUNDLE.getString(key); + } catch (MissingResourceException e) { + return '!' + key + '!'; + } + } +} Index: src/org/eclipse/cdt/rpm/ui/propertypage/ProvidesPage.java =================================================================== RCS file: src/org/eclipse/cdt/rpm/ui/propertypage/ProvidesPage.java diff -N src/org/eclipse/cdt/rpm/ui/propertypage/ProvidesPage.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/cdt/rpm/ui/propertypage/ProvidesPage.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,111 @@ +/* + * (c) 2004, 2005 Red Hat, Inc. + * + * This program is open source software licensed under the + * Eclipse Public License ver. 1 + */ + +package org.eclipse.cdt.rpm.ui.propertypage; + +import org.eclipse.cdt.rpm.core.utils.RPMQuery; +import org.eclipse.cdt.rpm.ui.util.ExceptionHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +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; + +public class ProvidesPage extends PropertyPage { + + private static final String RPM_QL = Messages.getString("ProvidesPage.Provides"); //$NON-NLS-1$ + + private static final int NAME_FIELD_WIDTH = 20; + + private static final int QL_FIELD_WIDTH = 80; + + private static final int QL_FIELD_HEIGHT = 40; + + private Text rpm_nameText; + + 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 + String rpm_path = ((IResource) getElement()).getRawLocation() + .toString(); + + try { + String rpm_ql = RPMQuery.getProvides((IFile) getElement()); + rpm_qlText.setText(rpm_ql); + } catch(CoreException e) { + ExceptionHandler.handle(e, getShell(), + Messages.getString("ErrorDialog.title"), e.getMessage()); + } + + } + + /** + * @see PreferencePage#createContents(Composite) + */ + 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; + } + + protected void performDefaults() { + + } + + public boolean performOk() { + + return true; + } + +} Index: src/org/eclipse/cdt/rpm/ui/propertypage/SpecFileHeaderPage.java =================================================================== RCS file: src/org/eclipse/cdt/rpm/ui/propertypage/SpecFileHeaderPage.java diff -N src/org/eclipse/cdt/rpm/ui/propertypage/SpecFileHeaderPage.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/cdt/rpm/ui/propertypage/SpecFileHeaderPage.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,107 @@ +/* + * (c) 2004, 2005 Red Hat, Inc. + * + * This program is open source software licensed under the + * Eclipse Public License ver. 1 + */ + +package org.eclipse.cdt.rpm.ui.propertypage; + +import org.eclipse.cdt.rpm.core.utils.RPMQuery; +import org.eclipse.cdt.rpm.ui.util.ExceptionHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.preference.PreferencePage; +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; + +public class SpecFileHeaderPage extends PropertyPage { + + private static final String RPM_QI = Messages.getString("SpecFileHeaderPage.info"); //$NON-NLS-1$ + + private static final int NAME_FIELD_WIDTH = 20; + + private static final int QI_FIELD_WIDTH = 80; + + private static final int QI_FIELD_HEIGHT = 40; + + private Text rpm_nameText; + + 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) { + ExceptionHandler.handle(e, getShell(), + Messages.getString("ErrorDialog.title"), e.getMessage()); + } + } + + /** + * @see PreferencePage#createContents(Composite) + */ + 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; + } + + protected void performDefaults() { + + } + + public boolean performOk() { + + return true; + } + +} Index: src/org/eclipse/cdt/rpm/ui/propertypage/TargetPage.java =================================================================== RCS file: src/org/eclipse/cdt/rpm/ui/propertypage/TargetPage.java diff -N src/org/eclipse/cdt/rpm/ui/propertypage/TargetPage.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/cdt/rpm/ui/propertypage/TargetPage.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,167 @@ +/* + * (c) 2004, 2005 Red Hat, Inc. + * + * This program is open source software licensed under the + * Eclipse Public License ver. 1 + */ + +package org.eclipse.cdt.rpm.ui.propertypage; + +import org.eclipse.cdt.rpm.core.utils.RPMQuery; +import org.eclipse.cdt.rpm.ui.util.ExceptionHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.preference.PreferencePage; +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; + +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 NAME_FIELD_WIDTH = 20; + + 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_nameText; + + 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_path = ((IResource) getElement()).getRawLocation() + .toString(); + 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) { + ExceptionHandler.handle(e, getShell(), + Messages.getString("ErrorDialog.title"), e.getMessage()); + } + + } + + /** + * @see PreferencePage#createContents(Composite) + */ + 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; + } + + protected void performDefaults() { + + } + + public boolean performOk() { + + return true; + } + +} Index: src/org/eclipse/cdt/rpm/ui/propertypage/messages.properties =================================================================== RCS file: src/org/eclipse/cdt/rpm/ui/propertypage/messages.properties diff -N src/org/eclipse/cdt/rpm/ui/propertypage/messages.properties --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/cdt/rpm/ui/propertypage/messages.properties 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,13 @@ +ErrorDialog.title=Error +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: