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 92887 Details for
Bug 222866
There is no title in the Connection Wizard.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
ecf.ui.patch
ecf.ui.patch (text/plain), 23.99 KB, created by
Hiroyuki
on 2008-03-19 07:56:20 EDT
(
hide
)
Description:
ecf.ui.patch
Filename:
MIME Type:
Creator:
Hiroyuki
Created:
2008-03-19 07:56:20 EDT
Size:
23.99 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ecf.ui >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/plugin.properties,v >retrieving revision 1.6 >diff -u -r1.6 plugin.properties >--- plugin.properties 6 Mar 2008 17:41:04 -0000 1.6 >+++ plugin.properties 19 Mar 2008 11:33:40 -0000 >@@ -10,8 +10,10 @@ > plugin.provider=Eclipse.org > > perspective.name = Communications >-view.name=Communications >+viewcategory.name=Communications > preferences.page.name=Communications >+newWizards.category.name=Communications >+commands.category.name=Communications > > configurationWizards.category.client=Clients > configurationWizards.category.server=Servers >\ No newline at end of file >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/plugin.xml,v >retrieving revision 1.35 >diff -u -r1.35 plugin.xml >--- plugin.xml 8 Jul 2007 19:54:27 -0000 1.35 >+++ plugin.xml 19 Mar 2008 11:33:41 -0000 >@@ -31,7 +31,7 @@ > <extension > point="org.eclipse.ui.views"> > <category >- name="%view.name" >+ name="%viewcategory.name" > id="org.eclipse.ecf.ui.viewcategory"/> > </extension> > <extension >@@ -47,7 +47,42 @@ > point="org.eclipse.ui.commands"> > <category > id="org.eclipse.ecf.ui.commands.category" >- name="Communications"> >+ name="%commands.category.name"> > </category> > </extension> >+ >+ <extension >+ point="org.eclipse.ui.perspectiveExtensions"> >+ <perspectiveExtension >+ targetID="org.eclipse.ecf.ui.perspective.communications"> >+ <perspectiveShortcut >+ id="org.eclipse.jdt.ui.JavaPerspective"> >+ </perspectiveShortcut> >+ <perspectiveShortcut >+ id="org.eclipse.ui.resourcePerspective"> >+ </perspectiveShortcut> >+ </perspectiveExtension> >+ <perspectiveExtension >+ targetID="org.eclipse.jdt.ui.JavaPerspective"> >+ <perspectiveShortcut >+ id="org.eclipse.ecf.ui.perspective.communications"> >+ </perspectiveShortcut> >+ </perspectiveExtension> >+ <perspectiveExtension >+ targetID="org.eclipse.ecf.ui.perspective.communications"> >+ <viewShortcut id="org.eclipse.ui.views.ResourceNavigator"/> >+ <viewShortcut id="org.eclipse.ui.views.PropertySheet"/> >+ <showInPart id="org.eclipse.ui.views.ResourceNavigator"/> >+ <showInPart id="org.eclipse.ui.views.PropertySheet"/> >+ </perspectiveExtension> >+ </extension> >+ >+ <extension >+ point="org.eclipse.ui.newWizards"> >+ <category >+ id="org.eclipse.ecf.ui.newWizards.category" >+ name="%newWizards.category.name"> >+ </category> >+ </extension> >+ > </plugin> >Index: src/org/eclipse/ecf/internal/ui/messages.properties >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/internal/ui/messages.properties,v >retrieving revision 1.10 >diff -u -r1.10 messages.properties >--- src/org/eclipse/ecf/internal/ui/messages.properties 5 Jan 2008 20:28:31 -0000 1.10 >+++ src/org/eclipse/ecf/internal/ui/messages.properties 19 Mar 2008 11:33:41 -0000 >@@ -47,6 +47,8 @@ > AbstractConnectWizardPage_PASSWORD_LABEL=Password: > AbstractConnectWizardPage_PROVIDER_TITLE=New Provider Connection > >+SelectProviderWizard_PROVIDER_TITLE=New Provider Connection >+SelectProviderWizardPage_PROVIDER_TITLE=Provider Connection Wizard > > AsynchContainerConnectAction_EXCEPTION_CONNECT=Container connect exception > AsynchContainerConnectAction_JOB_NAME=Container connect >Index: src/org/eclipse/ecf/internal/ui/Messages.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/internal/ui/Messages.java,v >retrieving revision 1.8 >diff -u -r1.8 Messages.java >--- src/org/eclipse/ecf/internal/ui/Messages.java 5 Jan 2008 20:28:31 -0000 1.8 >+++ src/org/eclipse/ecf/internal/ui/Messages.java 19 Mar 2008 11:33:41 -0000 >@@ -94,6 +94,10 @@ > public static String SelectProviderAction_selectProviderDialog_message; > > public static String ScreenCaptureScreenCaptureConfirmationDialog; >+ >+ public static String SelectProviderWizard_PROVIDER_TITLE; >+ public static String SelectProviderWizardPage_PROVIDER_TITLE; >+ > static { > // load message values from bundle file > NLS.initializeMessages(BUNDLE_NAME, Messages.class); >Index: src/org/eclipse/ecf/internal/ui/IImageFiles.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/internal/ui/IImageFiles.java,v >retrieving revision 1.7 >diff -u -r1.7 IImageFiles.java >--- src/org/eclipse/ecf/internal/ui/IImageFiles.java 8 Jul 2007 19:54:27 -0000 1.7 >+++ src/org/eclipse/ecf/internal/ui/IImageFiles.java 19 Mar 2008 11:33:41 -0000 >@@ -14,7 +14,11 @@ > public interface IImageFiles { > > public static final String IDENTITY = "/icons/enabled/identity.gif"; //$NON-NLS-1$ >- >+ >+ public static final String IDENTITY_AWAY = "/icons/enabled/identity_away.gif"; //$NON-NLS-1$ >+ public static final String IDENTITY_DND = "/icons/enabled/identity_do_not_disturb.gif"; //$NON-NLS-1$ >+ public static final String IDENTITY_UNAVAILABLE = "/icons/enabled/identity_disabled.gif"; //$NON-NLS-1$ >+ > public static final String USER_AVAILABLE = "icons/enabled/contact_enabled.gif"; //$NON-NLS-1$ > > public static final String USER_AWAY = "icons/enabled/contact_away.gif"; //$NON-NLS-1$ >Index: src/org/eclipse/ecf/internal/ui/Activator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/internal/ui/Activator.java,v >retrieving revision 1.10 >diff -u -r1.10 Activator.java >--- src/org/eclipse/ecf/internal/ui/Activator.java 8 Jul 2007 19:54:27 -0000 1.10 >+++ src/org/eclipse/ecf/internal/ui/Activator.java 19 Mar 2008 11:33:41 -0000 >@@ -159,6 +159,16 @@ > registry.put(SharedImages.IMG_IDENTITY, AbstractUIPlugin > .imageDescriptorFromPlugin(PLUGIN_ID, IImageFiles.IDENTITY) > .createImage()); >+ >+ registry.put(SharedImages.IMG_IDENTITY_AWAY, AbstractUIPlugin >+ .imageDescriptorFromPlugin(PLUGIN_ID, IImageFiles.IDENTITY_AWAY) >+ .createImage()); >+ registry.put(SharedImages.IMG_IDENTITY_DND, AbstractUIPlugin >+ .imageDescriptorFromPlugin(PLUGIN_ID, IImageFiles.IDENTITY_DND) >+ .createImage()); >+ registry.put(SharedImages.IMG_IDENTITY_UNAVAILABLE, AbstractUIPlugin >+ .imageDescriptorFromPlugin(PLUGIN_ID, IImageFiles.IDENTITY_UNAVAILABLE) >+ .createImage()); > > registry.put(SharedImages.IMG_COMMUNICATIONS, AbstractUIPlugin > .imageDescriptorFromPlugin(PLUGIN_ID, IImageFiles.COMMUNICATIONS) >Index: src/org/eclipse/ecf/ui/SharedImages.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/SharedImages.java,v >retrieving revision 1.7 >diff -u -r1.7 SharedImages.java >--- src/org/eclipse/ecf/ui/SharedImages.java 8 Jul 2007 19:54:27 -0000 1.7 >+++ src/org/eclipse/ecf/ui/SharedImages.java 19 Mar 2008 11:33:42 -0000 >@@ -20,7 +20,11 @@ > public final class SharedImages { > > public static final String IMG_IDENTITY = "IMG_IDENTITY"; >- >+ >+ public static final String IMG_IDENTITY_UNAVAILABLE = "IMG_IDENTITY_UNAVAILABLE"; //$NON-NLS-1$ >+ public static final String IMG_IDENTITY_DND = "IMG_IDENTITY_DND"; //$NON-NLS-1$ >+ public static final String IMG_IDENTITY_AWAY = "IMG_IDENTITY_AWAY"; //$NON-NLS-1$ >+ > public static final String IMG_USER_AVAILABLE = "IMG_USER_AVAILABLE"; //$NON-NLS-1$ > > public static final String IMG_USER_UNAVAILABLE = "IMG_USER_UNAVAILABLE"; //$NON-NLS-1$ >Index: src/org/eclipse/ecf/internal/ui/perspectives/CommunicationPerspective.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/internal/ui/perspectives/CommunicationPerspective.java,v >retrieving revision 1.2 >diff -u -r1.2 CommunicationPerspective.java >--- src/org/eclipse/ecf/internal/ui/perspectives/CommunicationPerspective.java 8 Jul 2007 20:39:46 -0000 1.2 >+++ src/org/eclipse/ecf/internal/ui/perspectives/CommunicationPerspective.java 19 Mar 2008 11:33:42 -0000 >@@ -27,13 +27,13 @@ > layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$ > > // Add "show views". >- layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); >- layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS); >- layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); >- layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET); >- layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); >- layout.addShowViewShortcut(IPageLayout.ID_PROGRESS_VIEW); >- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); >+ //layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); >+ //layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS); >+ //layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); >+ //layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET); >+ //layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); >+ //layout.addShowViewShortcut(IPageLayout.ID_PROGRESS_VIEW); >+ //layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); > } > > private void defineLayout(IPageLayout layout) { >@@ -42,17 +42,21 @@ > > // Top left. > IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.26f, editorArea); //$NON-NLS-1$ >+ topLeft.addView("org.eclipse.ecf.presence.ui.MultiRosterView"); //$NON-NLS-1$ > topLeft.addView(IPageLayout.ID_RES_NAV); > > // Bottom left. > IFolderLayout bottomLeft = layout.createFolder("bottomLeft", //$NON-NLS-1$ > IPageLayout.BOTTOM, 0.50f, "topLeft"); //$NON-NLS-1$ >- bottomLeft.addView(IPageLayout.ID_OUTLINE); >+ //bottomLeft.addView(IPageLayout.ID_OUTLINE); >+ bottomLeft.addView(IPageLayout.ID_PROP_SHEET); > > // Bottom right. > IFolderLayout bottomRight = layout.createFolder("bottomRight", //$NON-NLS-1$ > IPageLayout.BOTTOM, 0.66f, editorArea); >- bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW); >- bottomRight.addView(IPageLayout.ID_TASK_LIST); >+ //bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW); >+ //bottomRight.addView(IPageLayout.ID_TASK_LIST); >+ bottomRight.addView("org.eclipse.ecf.presence.ui.chatroom.ChatRoomManagerView"); //$NON-NLS-1$ >+ bottomRight.addView("org.eclipse.ecf.presence.ui.MessagesView"); //$NON-NLS-1$ > } > } >Index: src/org/eclipse/ecf/internal/ui/actions/SelectProviderAction.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/internal/ui/actions/SelectProviderAction.java,v >retrieving revision 1.11 >diff -u -r1.11 SelectProviderAction.java >--- src/org/eclipse/ecf/internal/ui/actions/SelectProviderAction.java 23 Jul 2007 23:13:38 -0000 1.11 >+++ src/org/eclipse/ecf/internal/ui/actions/SelectProviderAction.java 19 Mar 2008 11:33:41 -0000 >@@ -28,20 +28,21 @@ > import org.eclipse.ecf.internal.ui.Activator; > import org.eclipse.ecf.internal.ui.Messages; > import org.eclipse.ecf.internal.ui.wizards.IWizardRegistryConstants; >+import org.eclipse.ecf.internal.ui.wizards.SelectProviderWizard; > import org.eclipse.ecf.ui.IConfigurationWizard; > import org.eclipse.ecf.ui.IConnectWizard; >-import org.eclipse.ecf.ui.SharedImages; >+//import org.eclipse.ecf.ui.SharedImages; > import org.eclipse.jface.action.IAction; > import org.eclipse.jface.viewers.ISelection; >-import org.eclipse.jface.viewers.LabelProvider; >-import org.eclipse.jface.window.Window; >+//import org.eclipse.jface.viewers.LabelProvider; >+//import org.eclipse.jface.window.Window; > import org.eclipse.jface.wizard.WizardDialog; > import org.eclipse.osgi.util.NLS; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.events.SelectionListener; >-import org.eclipse.swt.graphics.Image; >+//import org.eclipse.swt.graphics.Image; > import org.eclipse.swt.widgets.Control; > import org.eclipse.swt.widgets.Menu; > import org.eclipse.swt.widgets.MenuItem; >@@ -49,7 +50,7 @@ > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.IWorkbenchWindowActionDelegate; > import org.eclipse.ui.IWorkbenchWindowPulldownDelegate; >-import org.eclipse.ui.dialogs.ElementListSelectionDialog; >+//import org.eclipse.ui.dialogs.ElementListSelectionDialog; > > // TODO, we should rework this class... it's confusing >_< > public class SelectProviderAction implements IWizardRegistryConstants, >@@ -181,24 +182,28 @@ > } > > public void run(IAction action) { >- ElementListSelectionDialog dialog = >- new ElementListSelectionDialog(window.getShell(), new ProviderLabelProvider()); >- dialog.setElements(elements.toArray()); >- dialog.setTitle(Messages.SelectProviderAction_selectProviderDialog_title); >- dialog.setMessage(Messages.SelectProviderAction_selectProviderDialog_message); >- dialog.setImage(SharedImages.getImage(SharedImages.IMG_COMMUNICATIONS)); >- dialog.setHelpAvailable(false); >- if(dialog.open() == Window.OK) { >- Object[] result = dialog.getResult(); >- IConfigurationElement element = (IConfigurationElement) result[0]; >- String factoryName = element.getAttribute(ATT_CONTAINER_TYPE_NAME); >- IConfigurationWizard wizard = getWizard(configurationWizards, factoryName); >- if (wizard == null) { >- openConnectWizard(element, factoryName); >- } else { >- openConnectWizard(wizard, element, factoryName); >- } >- } >+// ElementListSelectionDialog dialog = new ElementListSelectionDialog(window.getShell(), >+// new ProviderLabelProvider()); >+// dialog.setElements(elements.toArray()); >+// dialog.setTitle(Messages.SelectProviderAction_selectProviderDialog_title); >+// dialog.setMessage(Messages.SelectProviderAction_selectProviderDialog_message); >+// dialog.setImage(SharedImages.getImage(SharedImages.IMG_COMMUNICATIONS)); >+// dialog.setHelpAvailable(false); >+// if (dialog.open() == Window.OK) { >+// Object[] result = dialog.getResult(); >+// IConfigurationElement element = (IConfigurationElement) result[0]; >+// String factoryName = element.getAttribute(ATT_CONTAINER_TYPE_NAME); >+// IConfigurationWizard wizard = getWizard(configurationWizards, factoryName); >+// if (wizard == null) { >+// openConnectWizard(element, factoryName); >+// } else { >+// openConnectWizard(wizard, element, factoryName); >+// } >+// } >+ SelectProviderWizard wizard = new SelectProviderWizard(elements); >+ wizard.init(window.getWorkbench(), null); >+ WizardDialog dialog = new WizardDialog(window.getShell(),wizard); >+ dialog.open(); > } > > public void selectionChanged(IAction action, ISelection selection) { >@@ -238,19 +243,19 @@ > } > return menu; > } >- >- // isn't this a funny name? >- private class ProviderLabelProvider extends LabelProvider { > >- public Image getImage(Object element) { >- return null; >- } >+// // isn't this a funny name? >+// private class ProviderLabelProvider extends LabelProvider { >+// >+// public Image getImage(Object element) { >+// return null; >+// } >+// >+// public String getText(Object element) { >+// IConfigurationElement provider = (IConfigurationElement) element; >+// return provider.getAttribute(ATT_NAME); >+// } >+// >+// } > >- public String getText(Object element) { >- IConfigurationElement provider = (IConfigurationElement) element; >- return provider.getAttribute(ATT_NAME); >- } >- >- } >- > } >Index: src/org/eclipse/ecf/internal/ui/deprecated/views/RosterView.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.ui/src/org/eclipse/ecf/internal/ui/deprecated/views/RosterView.java,v >retrieving revision 1.6 >diff -u -r1.6 RosterView.java >--- src/org/eclipse/ecf/internal/ui/deprecated/views/RosterView.java 12 Dec 2007 22:11:38 -0000 1.6 >+++ src/org/eclipse/ecf/internal/ui/deprecated/views/RosterView.java 19 Mar 2008 11:33:42 -0000 >@@ -971,7 +971,8 @@ > } > > protected String getDateAndTime() { >- SimpleDateFormat sdf = new SimpleDateFormat("MM:dd hh:mm:ss"); >+ //SimpleDateFormat sdf = new SimpleDateFormat("MM:dd hh:mm:ss"); >+ SimpleDateFormat sdf = new SimpleDateFormat("MM:dd HH:mm:ss"); > return sdf.format(new Date()); > } > >@@ -985,7 +986,8 @@ > // finally, show message > if (window != null) { > window.handleMessageEvent(messageEvent); >- window.setStatus("last message received at " + (new SimpleDateFormat("hh:mm:ss").format(new Date()))); >+ //window.setStatus("last message received at " + (new SimpleDateFormat("hh:mm:ss").format(new Date()))); >+ window.setStatus("last message received at " + (new SimpleDateFormat("HH:mm:ss").format(new Date()))); > } > } > >Index: src/org/eclipse/ecf/internal/ui/wizards/SelectProviderWizardPage.java >=================================================================== >RCS file: src/org/eclipse/ecf/internal/ui/wizards/SelectProviderWizardPage.java >diff -N src/org/eclipse/ecf/internal/ui/wizards/SelectProviderWizardPage.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ecf/internal/ui/wizards/SelectProviderWizardPage.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,105 @@ >+package org.eclipse.ecf.internal.ui.wizards; >+ >+import java.util.List; >+import org.eclipse.core.runtime.IConfigurationElement; >+import org.eclipse.ecf.internal.ui.Activator; >+import org.eclipse.ecf.internal.ui.Messages; >+import org.eclipse.ecf.ui.SharedImages; >+import org.eclipse.jface.resource.ImageDescriptor; >+import org.eclipse.jface.viewers.*; >+import org.eclipse.jface.wizard.WizardPage; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Label; >+ >+final class SelectProviderWizardPage extends WizardPage { >+ >+ private TableViewer tableView; >+ private Image iconImage; >+ private List elements;; >+ >+ SelectProviderWizardPage(List elements) { >+ super("SelectProviderWizardPage"); //$NON-NLS-1$ >+ >+ this.elements = elements; >+ >+ setTitle(Messages.SelectProviderWizardPage_PROVIDER_TITLE); >+ setDescription(""); //$NON-NLS-1$ >+ setPageComplete(false); >+ setImageDescriptor(SharedImages.getImageDescriptor(SharedImages.IMG_CHAT_WIZARD)); >+ >+ ImageDescriptor icon = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/enabled/new_connection.gif"); >+ iconImage = icon.createImage(); >+ >+ } >+ >+ public void createControl(Composite parent) { >+ >+ Composite composite = new Composite(parent, SWT.NONE); >+ >+ composite.setLayout(new GridLayout()); >+ GridData fillData = new GridData(SWT.FILL, SWT.CENTER, true, false); >+ GridData endData = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1); >+ >+ Label label = new Label(composite, SWT.LEFT); >+ label.setText(Messages.SelectProviderAction_selectProviderDialog_message); >+ >+ tableView = new TableViewer(composite, SWT.BORDER | SWT.SINGLE); >+ GridData gData = new GridData(GridData.FILL_BOTH); >+ tableView.getTable().setLayoutData(gData); >+ tableView.getTable().setHeaderVisible(false); >+ tableView.setContentProvider(new ProviderContentProvider()); >+ tableView.setLabelProvider(new ProviderLabelProvider()); >+ tableView.addSelectionChangedListener(new ISelectionChangedListener() { >+ public void selectionChanged(SelectionChangedEvent event) { >+ SelectProviderWizard mainWizard = (SelectProviderWizard) getWizard(); >+ IStructuredSelection select = (IStructuredSelection) event.getSelection(); >+ mainWizard.setTargetPages(select.getFirstElement()); >+ updateStatus(null); >+ } >+ >+ }); >+ // TableColumn tc = new TableColumn(tableView.getTable(), SWT.NONE); >+ // tc.setWidth(100); >+ // tableView.getTable().pack(); >+ tableView.setInput(elements); >+ >+ org.eclipse.jface.dialogs.Dialog.applyDialogFont(composite); >+ setControl(composite); >+ } >+ >+ private void updateStatus(String message) { >+ setErrorMessage(message); >+ setPageComplete(message == null); >+ } >+ >+ private class ProviderContentProvider implements IStructuredContentProvider { >+ >+ public Object[] getElements(Object inputElement) { >+ >+ return ((List) inputElement).toArray(); >+ } >+ >+ public void dispose() { >+ } >+ >+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { >+ } >+ } >+ >+ private class ProviderLabelProvider extends LabelProvider { >+ >+ public Image getImage(Object element) { >+ return iconImage; >+ } >+ >+ public String getText(Object element) { >+ IConfigurationElement provider = (IConfigurationElement) element; >+ return provider.getAttribute(IWizardRegistryConstants.ATT_NAME); >+ } >+ >+ } >+} >Index: src/org/eclipse/ecf/internal/ui/wizards/SelectProviderWizard.java >=================================================================== >RCS file: src/org/eclipse/ecf/internal/ui/wizards/SelectProviderWizard.java >diff -N src/org/eclipse/ecf/internal/ui/wizards/SelectProviderWizard.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ecf/internal/ui/wizards/SelectProviderWizard.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,82 @@ >+package org.eclipse.ecf.internal.ui.wizards; >+ >+import java.util.List; >+import org.eclipse.core.runtime.IConfigurationElement; >+import org.eclipse.ecf.core.ContainerFactory; >+import org.eclipse.ecf.core.IContainer; >+import org.eclipse.ecf.internal.ui.Messages; >+import org.eclipse.ecf.ui.IConnectWizard; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.wizard.IWizardPage; >+import org.eclipse.jface.wizard.Wizard; >+import org.eclipse.ui.*; >+ >+public final class SelectProviderWizard extends Wizard/*4ECF*/implements INewWizard { >+ >+ private List elements; >+ private INewWizard[] targetWizards; >+ private int targetWizardIndex = -1; >+ private SelectProviderWizardPage mainPage; >+ >+ public SelectProviderWizard(List elements) { >+ super(); >+ this.elements = elements; >+ >+ setForcePreviousAndNextButtons(true); >+ mainPage = new SelectProviderWizardPage(elements); >+ IWorkbench workbench = PlatformUI.getWorkbench(); >+ int n; >+ targetWizards = new INewWizard[elements.size()]; >+ for (n = 0; n < targetWizards.length; n++) { >+ IConfigurationElement ice = (IConfigurationElement) elements.get(n); >+ try { >+ targetWizards[n] = (INewWizard) ice.createExecutableExtension(IWizardRegistryConstants.ATT_CLASS); >+ targetWizards[n].addPages(); >+ final String factoryName = ice.getAttribute(IWizardRegistryConstants.ATT_CONTAINER_TYPE_NAME); >+ IContainer container = ContainerFactory.getDefault().createContainer(factoryName); >+ ((IConnectWizard) targetWizards[n]).init(workbench, container); >+ } catch (Exception e) { >+ // None >+ } >+ } >+ } >+ >+ public void addPages() { >+ addPage(mainPage); >+ } >+ >+ public void setTargetPages(Object target) { >+ for (int i = 0; i < elements.size(); i++) { >+ if (elements.get(i).equals(target)) { >+ targetWizardIndex = i; >+ } >+ } >+ } >+ >+ public IWizardPage getNextPage(IWizardPage page) { >+ if (targetWizardIndex < 0) >+ return null; >+ IWizardPage[] pages = targetWizards[targetWizardIndex].getPages(); >+ if (pages.length < 2) >+ return pages[0]; >+ return pages[1]; >+ } >+ >+ public boolean canFinish() { >+ if (getContainer().getCurrentPage().equals(mainPage)) >+ return false; >+ if (targetWizardIndex < 0) >+ return false; >+ return targetWizards[targetWizardIndex].canFinish(); >+ } >+ >+ public boolean performFinish() { >+ if (targetWizardIndex < 0) >+ return false; >+ return true; >+ } >+ >+ public void init(IWorkbench workbench, IStructuredSelection selection) { >+ setWindowTitle(Messages.SelectProviderWizard_PROVIDER_TITLE); >+ } >+}
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 222866
:
92633
|
92634
| 92887 |
92888
|
92889
|
92890
|
92891
|
92892
|
92893
|
92894
|
92895
|
92896
|
93202