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 144594 Details for
Bug 247265
Use FilteredTree in new feature project wizard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for PluginListPage
patch (text/plain), 8.61 KB, created by
Simon Muschel
on 2009-08-14 17:06:37 EDT
(
hide
)
Description:
Patch for PluginListPage
Filename:
MIME Type:
Creator:
Simon Muschel
Created:
2009-08-14 17:06:37 EDT
Size:
8.61 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >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.443 >diff -u -r1.443 PDEUIMessages.java >--- src/org/eclipse/pde/internal/ui/PDEUIMessages.java 10 Aug 2009 17:10:17 -0000 1.443 >+++ src/org/eclipse/pde/internal/ui/PDEUIMessages.java 14 Aug 2009 20:23:29 -0000 >@@ -8,6 +8,7 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Code 9 Corporation - on going enhancements and maintenance >+ * Simon Muschel <smuschel@gmx.de> - bug 247265 > *******************************************************************************/ > package org.eclipse.pde.internal.ui; > >@@ -211,6 +212,8 @@ > > public static String PluginListPage_initializeFromPlugins; > >+ public static String PluginListPage_pluginFilter; >+ > public static String PluginSection_includeOptional; > > public static String PluginsTab_allPlugins; >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.1094 >diff -u -r1.1094 pderesources.properties >--- src/org/eclipse/pde/internal/ui/pderesources.properties 10 Aug 2009 17:10:17 -0000 1.1094 >+++ src/org/eclipse/pde/internal/ui/pderesources.properties 14 Aug 2009 20:23:32 -0000 >@@ -8,6 +8,7 @@ > # Contributors: > # IBM Corporation - initial API and implementation > # Code 9 Corporation - on going enhancements and maintenance >+# Simon Muschel <smuschel@gmx.de> - bug 247265 > ############################################################################### > ##################################### > # PDE resource strings >@@ -1364,6 +1365,7 @@ > FragmentGeneralInfoSection_singleton=This fragment is a singleton > PluginWorkingSet_deselectAll_toolTip=Unselect all of these plug-ins for this working set. > PluginListPage_initializeFromPlugins=&Initialize from the plug-ins list: >+PluginListPage_pluginFilter=Plug-in filter: > PluginEditor_exportTooltip=Export deployable plug-ins and fragments > PluginWorkingSet_noPluginsChecked=At least one plug-in must be checked > PluginStatusDialog_pluginValidation=Validation >Index: src/org/eclipse/pde/internal/ui/wizards/feature/PluginListPage.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/PluginListPage.java,v >retrieving revision 1.19 >diff -u -r1.19 PluginListPage.java >--- src/org/eclipse/pde/internal/ui/wizards/feature/PluginListPage.java 30 Jul 2008 21:25:34 -0000 1.19 >+++ src/org/eclipse/pde/internal/ui/wizards/feature/PluginListPage.java 14 Aug 2009 20:23:32 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 IBM Corporation and others. > * 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 >@@ -7,28 +7,30 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Simon Muschel <smuschel@gmx.de> - bug 247265 > *******************************************************************************/ > package org.eclipse.pde.internal.ui.wizards.feature; > > import com.ibm.icu.text.Collator; > import java.util.TreeSet; >+import java.util.regex.Pattern; >+import java.util.regex.PatternSyntaxException; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.debug.core.*; > import org.eclipse.debug.ui.DebugUITools; > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jface.dialogs.IDialogSettings; >-import org.eclipse.jface.viewers.CheckboxTableViewer; >-import org.eclipse.jface.viewers.IStructuredContentProvider; >+import org.eclipse.jface.viewers.*; > import org.eclipse.pde.core.plugin.*; > import org.eclipse.pde.internal.core.PDECore; >+import org.eclipse.pde.internal.core.util.PatternConstructor; > import org.eclipse.pde.internal.ui.*; > import org.eclipse.pde.internal.ui.elements.DefaultContentProvider; > import org.eclipse.pde.internal.ui.wizards.ListUtil; > import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut; > import org.eclipse.pde.ui.launcher.IPDELauncherConstants; > import org.eclipse.swt.SWT; >-import org.eclipse.swt.events.SelectionAdapter; >-import org.eclipse.swt.events.SelectionEvent; >+import org.eclipse.swt.events.*; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.*; >@@ -43,13 +45,44 @@ > > private Combo fLaunchConfigsCombo; > private Button fInitLaunchConfigButton; >+ private CheckboxTableViewer fPluginViewer; >+ private Text fFilterText; > > private static final String S_INIT_LAUNCH = "initLaunch"; //$NON-NLS-1$ > >+ class PluginFilter extends ViewerFilter { >+ private String wMatch = "*"; //$NON-NLS-1$ >+ >+ public void setMatchText(String match) { >+ if (match.indexOf("*") != 0 & match.indexOf("?") != 0 & match.indexOf(".") != 0) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ match = "*" + match; //$NON-NLS-1$ >+ } >+ wMatch = match + "*"; //$NON-NLS-1$ >+ } >+ >+ public boolean select(Viewer viewer, Object parentElement, Object element) { >+ if (element instanceof IPluginModelBase) { >+ IPluginModelBase model = (IPluginModelBase) element; >+ String id = model.getPluginBase().getId(); >+ Pattern pattern = null; >+ try { >+ pattern = PatternConstructor.createPattern(wMatch, false); >+ } catch (PatternSyntaxException e) { >+ return true; >+ } >+ return pattern != null && pattern.matcher(id.subSequence(0, id.length())).matches(); >+ } >+ return true; >+ } >+ } >+ >+ private PluginFilter fPluginFilter; >+ > public PluginListPage() { > super("pluginListPage"); //$NON-NLS-1$ > setTitle(PDEUIMessages.NewFeatureWizard_PlugPage_title); > setDescription(PDEUIMessages.NewFeatureWizard_PlugPage_desc); >+ fPluginFilter = new PluginFilter(); > } > > public void createControl(Composite parent) { >@@ -95,11 +128,45 @@ > initPluginsButton.setSelection(!initLaunch); > } > >+ Composite labelContainer = new Composite(container, SWT.NONE); >+ gd = new GridData(GridData.FILL_HORIZONTAL); >+ gd.horizontalSpan = 3; >+ gd.horizontalIndent = 30; >+ gd.widthHint = 300; >+ labelContainer.setLayoutData(gd); >+ layout = new GridLayout(2, false); >+ layout.marginHeight = layout.marginWidth = 0; >+ labelContainer.setLayout(layout); >+ >+ Label filterLabel = new Label(labelContainer, SWT.NONE); >+ filterLabel.setText(PDEUIMessages.PluginListPage_pluginFilter); >+ gd = new GridData(); >+ gd.verticalAlignment = GridData.CENTER; >+ filterLabel.setLayoutData(gd); >+ fFilterText = new Text(labelContainer, SWT.BORDER); >+ fFilterText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ fFilterText.addModifyListener(new ModifyListener() { >+ public void modifyText(ModifyEvent e) { >+ fPluginFilter.setMatchText(fFilterText.getText()); >+ fPluginViewer.refresh(); >+ } >+ }); >+ fFilterText.addKeyListener(new KeyListener() { >+ public void keyPressed(KeyEvent e) { >+ if (e.keyCode == SWT.ARROW_DOWN) >+ fPluginViewer.getControl().setFocus(); >+ } >+ >+ public void keyReleased(KeyEvent e) { >+ } >+ }); >+ > tablePart.createControl(container, 3); >- CheckboxTableViewer pluginViewer = tablePart.getTableViewer(); >- pluginViewer.setContentProvider(new PluginContentProvider()); >- pluginViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider()); >- pluginViewer.setComparator(ListUtil.PLUGIN_COMPARATOR); >+ fPluginViewer = tablePart.getTableViewer(); >+ fPluginViewer.setContentProvider(new PluginContentProvider()); >+ fPluginViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider()); >+ fPluginViewer.setComparator(ListUtil.PLUGIN_COMPARATOR); >+ fPluginViewer.addFilter(fPluginFilter); > gd = (GridData) tablePart.getControl().getLayoutData(); > if (launchConfigs.length > 0) { > gd.horizontalIndent = 30; >@@ -107,7 +174,7 @@ > } > gd.heightHint = 250; > gd.widthHint = 300; >- pluginViewer.setInput(PDECore.getDefault().getModelManager()); >+ fPluginViewer.setInput(PDECore.getDefault().getModelManager()); > tablePart.setSelection(new Object[0]); > tablePart.setEnabled(!initLaunch); > setControl(container);
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 247265
:
112531
| 144594