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 163454 Details for
Bug 305263
consider removing version column in feature based self hosting
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
20100330.txt (text/plain), 5.05 KB, created by
Ankur Sharma
on 2010-03-30 16:20:06 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ankur Sharma
Created:
2010-03-30 16:20:06 EDT
Size:
5.05 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java,v >retrieving revision 1.10 >diff -u -r1.10 FeatureBlock.java >--- src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java 18 Mar 2010 19:02:26 -0000 1.10 >+++ src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java 30 Mar 2010 20:12:22 -0000 >@@ -47,7 +47,10 @@ > */ > public class FeatureBlock { > >- class FeatureTreeLabelProvider extends PDELabelProvider { >+ class FeatureTreeLabelProvider extends StyledCellLabelProvider { >+ >+ PDELabelProvider pdeLabelProvider = new PDELabelProvider(); >+ > /* (non-Javadoc) > * @see org.eclipse.pde.internal.ui.util.SharedLabelProvider#getColumnImage(java.lang.Object, int) > */ >@@ -55,7 +58,7 @@ > // If there is a workspace feature available, display the workspace feature icon, even if the user has selected external > if (index == COLUMN_FEATURE_NAME) { > FeatureLaunchModel model = (FeatureLaunchModel) obj; >- return getImage(model.getModel(true)); >+ return pdeLabelProvider.getImage(model.getModel(true)); > } > return null; > } >@@ -65,14 +68,37 @@ > switch (index) { > case COLUMN_FEATURE_NAME : > return model.getId(); >- case COLUMN_FEATURE_VERSION : >- return model.getVersion(); > case COLUMN_PLUGIN_RESOLUTION : > return model.getResolutionLabel(); > default : > return ""; //$NON-NLS-1$ > } > } >+ >+ public void update(ViewerCell cell) { >+ switch (cell.getColumnIndex()) { >+ case COLUMN_FEATURE_NAME : >+ StyledString label = getStyledText(cell.getElement()); >+ cell.setStyleRanges(label.getStyleRanges()); >+ cell.setText(label.toString()); >+ cell.setImage(getColumnImage(cell.getElement(), COLUMN_FEATURE_NAME)); >+ break; >+ case COLUMN_PLUGIN_RESOLUTION : >+ cell.setText(getColumnText(cell.getElement(), COLUMN_PLUGIN_RESOLUTION)); >+ break; >+ } >+ super.update(cell); >+ } >+ >+ public StyledString getStyledText(Object element) { >+ FeatureLaunchModel model = (FeatureLaunchModel) element; >+ StyledString styledString = new StyledString(getColumnText(element, COLUMN_FEATURE_NAME)); >+ styledString.append(" (", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$ >+ String version = model.getVersion(); >+ styledString.append(version.substring(0, version.indexOf('-')), StyledString.QUALIFIER_STYLER); >+ styledString.append(")", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$ >+ return styledString; >+ } > } > > class ButtonSelectionListener extends SelectionAdapter { >@@ -376,8 +402,7 @@ > } > > private static final int COLUMN_FEATURE_NAME = 0; >- private static final int COLUMN_FEATURE_VERSION = 1; >- private static final int COLUMN_PLUGIN_RESOLUTION = 2; >+ private static final int COLUMN_PLUGIN_RESOLUTION = 1; > > private static final String COLUMN_ID = "columnID"; //$NON-NLS-1$ > private static final String PROPERTY_RESOLUTION = "resolution"; //$NON-NLS-1$ >@@ -459,21 +484,15 @@ > > TreeColumn column1 = new TreeColumn(fTree.getTree(), SWT.LEFT); > column1.setText(PDEUIMessages.FeatureBlock_features); >- column1.setWidth(300); >+ column1.setWidth(400); > column1.addSelectionListener(fListener); >- column1.setData(COLUMN_ID, new Integer(0)); >+ column1.setData(COLUMN_ID, new Integer(COLUMN_FEATURE_NAME)); > >- TreeColumn column2 = new TreeColumn(fTree.getTree(), SWT.LEFT); >- column2.setText(PDEUIMessages.FeatureBlock_version); >- column2.setWidth(250); >+ TreeColumn column2 = new TreeColumn(fTree.getTree(), SWT.CENTER); >+ column2.setText(PDEUIMessages.FeatureBlock_pluginResolution); >+ column2.setWidth(100); > column2.addSelectionListener(fListener); >- column2.setData(COLUMN_ID, new Integer(1)); >- >- TreeColumn column3 = new TreeColumn(fTree.getTree(), SWT.CENTER); >- column3.setText(PDEUIMessages.FeatureBlock_pluginResolution); >- column3.setWidth(100); >- column3.addSelectionListener(fListener); >- column3.setData(COLUMN_ID, new Integer(3)); >+ column2.setData(COLUMN_ID, new Integer(COLUMN_PLUGIN_RESOLUTION)); > > fTree.getTree().setHeaderVisible(true); > fTree.setLabelProvider(new FeatureTreeLabelProvider()); >@@ -487,8 +506,8 @@ > String[] items = new String[] {PDEUIMessages.FeatureBlock_default, PDEUIMessages.FeatureBlock_workspaceBefore, PDEUIMessages.FeatureBlock_externalBefore}; > ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(fTree.getTree(), items); > cellEditor.getControl().pack(); >- fTree.setCellEditors(new CellEditor[] {null, null, cellEditor, cellEditor}); >- fTree.setColumnProperties(new String[] {null, null, PROPERTY_RESOLUTION}); >+ fTree.setCellEditors(new CellEditor[] {null, cellEditor}); >+ fTree.setColumnProperties(new String[] {null, PROPERTY_RESOLUTION}); > fTree.setCellModifier(new LocationCellModifier()); > fTree.addDoubleClickListener(new IDoubleClickListener() { > public void doubleClick(DoubleClickEvent event) {
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 305263
: 163454 |
163539