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 183981 Details for
Bug 331274
Update on "RCP application with a view" template - ArrayContentProvider and TableViewerColumn
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 for ArrayContentProvider
patchRemoveUnnecessaryContentProvider.txt (text/plain), 2.03 KB, created by
Lars Vogel
on 2010-11-27 15:14:44 EST
(
hide
)
Description:
Patch for ArrayContentProvider
Filename:
MIME Type:
Creator:
Lars Vogel
Created:
2010-11-27 15:14:44 EST
Size:
2.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui.templates >Index: templates_3.3/viewRCP/java/View.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/View.java,v >retrieving revision 1.4 >diff -u -r1.4 View.java >--- templates_3.3/viewRCP/java/View.java 2 Dec 2009 17:00:32 -0000 1.4 >+++ templates_3.3/viewRCP/java/View.java 27 Nov 2010 20:10:45 -0000 >@@ -1,5 +1,6 @@ > package $packageName$; > >+import org.eclipse.jface.viewers.ArrayContentProvider; > import org.eclipse.jface.viewers.IStructuredContentProvider; > import org.eclipse.jface.viewers.ITableLabelProvider; > import org.eclipse.jface.viewers.LabelProvider; >@@ -16,29 +17,7 @@ > public static final String ID = "$pluginId$.view"; > > private TableViewer viewer; >- >- /** >- * The content provider class is responsible for providing objects to the >- * view. It can wrap existing objects in adapters or simply return objects >- * as-is. These objects may be sensitive to the current input of the view, >- * or ignore it and always show the same content (like Task List, for >- * example). >- */ >- class ViewContentProvider implements IStructuredContentProvider { >- public void inputChanged(Viewer v, Object oldInput, Object newInput) { >- } >- >- public void dispose() { >- } >- >- public Object[] getElements(Object parent) { >- if (parent instanceof Object[]) { >- return (Object[]) parent; >- } >- return new Object[0]; >- } >- } >- >+ > class ViewLabelProvider extends LabelProvider implements > ITableLabelProvider { > public String getColumnText(Object obj, int index) { >@@ -62,7 +41,7 @@ > public void createPartControl(Composite parent) { > viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL > | SWT.V_SCROLL); >- viewer.setContentProvider(new ViewContentProvider()); >+ viewer.setContentProvider(new ArrayContentProvider()); > viewer.setLabelProvider(new ViewLabelProvider()); > // Provide the input to the ContentProvider > viewer.setInput(new String[] {"One", "Two", "Three"});
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 Raw
Actions:
View
Attachments on
bug 331274
:
183981
|
183983
|
183984