Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 131878 Details for
Bug 272068
[category] Hook export to use category definitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
o.e.pde.ui updated patch
clipboard.txt (text/plain), 7.95 KB, created by
Ian Bull
on 2009-04-15 00:00:52 EDT
(
hide
)
Description:
o.e.pde.ui updated patch
Filename:
MIME Type:
Creator:
Ian Bull
Created:
2009-04-15 00:00:52 EDT
Size:
7.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/wizards/exports/FeatureOptionsTab.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureOptionsTab.java,v >retrieving revision 1.8 >diff -u -r1.8 FeatureOptionsTab.java >--- src/org/eclipse/pde/internal/ui/wizards/exports/FeatureOptionsTab.java 9 Mar 2009 19:04:54 -0000 1.8 >+++ src/org/eclipse/pde/internal/ui/wizards/exports/FeatureOptionsTab.java 15 Apr 2009 03:58:58 -0000 >@@ -14,23 +14,29 @@ > import org.eclipse.pde.internal.core.FeatureModelManager; > import org.eclipse.pde.internal.core.PDECore; > import org.eclipse.pde.internal.core.ifeature.IFeatureModel; >-import org.eclipse.pde.internal.ui.PDEUIMessages; >-import org.eclipse.pde.internal.ui.SWTFactory; >+import org.eclipse.pde.internal.ui.*; >+import org.eclipse.pde.internal.ui.util.SWTUtil; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.layout.GridData; >-import org.eclipse.swt.widgets.Button; >-import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.*; > > public class FeatureOptionsTab extends ExportOptionsTab { > > private static final String S_MULTI_PLATFORM = "multiplatform"; //$NON-NLS-1$ > private static final String S_EXPORT_METADATA = "p2metadata"; //$NON-NLS-1$ >+ private static final String S_CATEGORY_FILE = "category_file"; //$NON-NLS-1$ >+ private static final String S_CREATE_CATEGORIES = "create_categories"; //$NON-NLS-1$ > > private Button fMultiPlatform; > private Button fExportMetadata; > >+ private Button fCategoryButton; >+ private Combo fCategoryCombo; >+ private Button fCategoryBrowse; >+ > public FeatureOptionsTab(FeatureExportWizardPage page) { > super(page); > } >@@ -39,6 +45,8 @@ > fJarButton.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { > fExportMetadata.setEnabled(fJarButton.getSelection()); >+ fCategoryButton.setEnabled(fExportMetadata.getSelection() && fJarButton.getSelection()); >+ updateCategoryGeneration(); > } > }); > fExportMetadata = SWTFactory.createCheckButton(comp, PDEUIMessages.ExportWizard_includesMetadata, null, false, 1); >@@ -51,6 +59,31 @@ > fMultiPlatform = new Button(comp, SWT.CHECK); > fMultiPlatform.setText(PDEUIMessages.ExportWizard_multi_platform); > } >+ Composite categoryComposite = new Composite(comp, SWT.NONE); >+ >+ data = new GridData(SWT.FILL, SWT.FILL, true, false); >+ data.horizontalIndent = 20; >+ categoryComposite.setLayoutData(data); >+ GridLayout layout = new GridLayout(3, false); >+ layout.marginRight = 0; >+ layout.marginLeft = 0; >+ layout.marginWidth = 0; >+ layout.marginHeight = 0; >+ layout.marginBottom = 0; >+ layout.marginTop = 0; >+ categoryComposite.setLayout(layout); >+ >+ fCategoryButton = new Button(categoryComposite, SWT.CHECK); >+ fCategoryButton.setText(PDEUIMessages.ExportWizard_generateCategories + ":"); //$NON-NLS-1$ >+ fCategoryButton.setSelection(true); >+ >+ fCategoryCombo = new Combo(categoryComposite, SWT.NONE); >+ fCategoryCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ >+ fCategoryBrowse = new Button(categoryComposite, SWT.PUSH); >+ fCategoryBrowse.setText(PDEUIMessages.ExportWizard_browse); >+ fCategoryBrowse.setLayoutData(new GridData()); >+ SWTUtil.setButtonDimensionHint(fCategoryBrowse); > > } > >@@ -74,6 +107,13 @@ > String selected = settings.get(S_EXPORT_METADATA); > fExportMetadata.setSelection(selected == null ? true : Boolean.TRUE.toString().equals(selected)); > fExportMetadata.setEnabled(fJarButton.getSelection()); >+ selected = settings.get(S_CREATE_CATEGORIES); >+ >+ fCategoryButton.setEnabled(fExportMetadata.getSelection() && fJarButton.getSelection()); >+ fCategoryButton.setSelection(selected == null ? true : Boolean.TRUE.toString().equals(selected)); >+ if (settings.get(S_CATEGORY_FILE) != null) >+ fCategoryCombo.setText(settings.get(S_CATEGORY_FILE)); >+ updateCategoryGeneration(); > } > > protected void saveSettings(IDialogSettings settings) { >@@ -82,6 +122,8 @@ > settings.put(S_MULTI_PLATFORM, fMultiPlatform.getSelection()); > } > settings.put(S_EXPORT_METADATA, doExportMetadata()); >+ settings.put(S_CREATE_CATEGORIES, fCategoryButton.getSelection()); >+ settings.put(S_CATEGORY_FILE, fCategoryCombo.getText()); > } > > protected void hookListeners() { >@@ -93,6 +135,29 @@ > } > }); > } >+ >+ fExportMetadata.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ fCategoryButton.setEnabled(fExportMetadata.getSelection() && fJarButton.getSelection()); >+ updateCategoryGeneration(); >+ } >+ }); >+ fCategoryButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ updateCategoryGeneration(); >+ } >+ }); >+ >+ fCategoryBrowse.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ openFile(fCategoryCombo, new String[] {"*.xml", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ }); >+ } >+ >+ protected void updateCategoryGeneration() { >+ fCategoryBrowse.setEnabled(fExportMetadata.getSelection() && fCategoryButton.getSelection() && fJarButton.getSelection()); >+ fCategoryCombo.setEnabled(fExportMetadata.getSelection() && fCategoryButton.getSelection() && fJarButton.getSelection()); > } > > protected boolean doMultiplePlatform() { >@@ -102,6 +167,24 @@ > protected void setEnabledForInstall(boolean enabled) { > super.setEnabledForInstall(enabled); > fExportMetadata.setEnabled(enabled); >+ fCategoryButton.setEnabled(enabled); >+ fCategoryCombo.setEnabled(enabled); >+ fCategoryBrowse.setEnabled(enabled); >+ } >+ >+ protected void openFile(Combo combo, String[] filter) { >+ FileDialog dialog = new FileDialog(fPage.getShell(), SWT.OPEN); >+ String path = combo.getText(); >+ if (path.trim().length() == 0) >+ path = PDEPlugin.getWorkspace().getRoot().getLocation().toString(); >+ dialog.setFilterExtensions(filter); >+ dialog.setFileName(path); >+ String res = dialog.open(); >+ if (res != null) { >+ if (combo.indexOf(res) == -1) >+ combo.add(res, 0); >+ combo.setText(res); >+ } > } > > } >Index: src/org/eclipse/pde/internal/ui/PDEUIMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java,v >retrieving revision 1.432 >diff -u -r1.432 PDEUIMessages.java >--- src/org/eclipse/pde/internal/ui/PDEUIMessages.java 14 Apr 2009 21:49:59 -0000 1.432 >+++ src/org/eclipse/pde/internal/ui/PDEUIMessages.java 15 Apr 2009 03:58:53 -0000 >@@ -1677,6 +1677,7 @@ > public static String ExportWizard_includeSourceInBinaryBundles; > public static String ExportWizard_generateAssociatedSourceBundles; > public static String ExportWizard_includesMetadata; >+ public static String ExportWizard_generateCategories; > public static String ExportWizard_multi_platform; > public static String ExportWizard_destination; > public static String ExportWizard_options; >Index: src/org/eclipse/pde/internal/ui/pderesources.properties >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties,v >retrieving revision 1.1073 >diff -u -r1.1073 pderesources.properties >--- src/org/eclipse/pde/internal/ui/pderesources.properties 14 Apr 2009 21:49:59 -0000 1.1073 >+++ src/org/eclipse/pde/internal/ui/pderesources.properties 15 Apr 2009 03:58:58 -0000 >@@ -1508,6 +1508,7 @@ > ExportWizard_includeSourceInBinaryBundles = Include source in exported plug-ins > ExportWizard_generateAssociatedSourceBundles = Generate source bundles > ExportWizard_includesMetadata = Generate metadata &repository >+ExportWizard_generateCategories = &Categorize repository > ExportWizard_multi_platform = Export for &multiple platforms > ExportWizard_destination = &Destination > ExportWizard_options = &Options
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272068
:
131864
|
131865
|
131878
|
131879
|
132296
|
133232
|
133233