1 12 package org.eclipse.team.internal.ccvs.ui; 13 14 import org.eclipse.jface.dialogs.Dialog; 15 import org.eclipse.jface.dialogs.TrayDialog; 16 import org.eclipse.swt.SWT; 17 import org.eclipse.swt.widgets.*; 18 import org.eclipse.team.internal.ccvs.core.EditorsInfo; 19 import org.eclipse.ui.PlatformUI; 20 21 28 public class EditorsDialog extends TrayDialog { 29 34 35 EditorsView editorsView; 36 EditorsInfo[] editorsInfo; 37 38 public EditorsDialog(Shell shell, EditorsInfo[] infos) { 39 super(shell); 40 editorsInfo = infos; 41 } 42 43 protected Control createDialogArea(Composite container) { 44 45 Composite parent = (Composite) super.createDialogArea(container); 46 47 getShell().setText(CVSUIMessages.EditorsDialog_title); 48 createMessageArea(parent); 49 editorsView = new EditorsView(); 50 editorsView.createPartControl(container); 51 editorsView.setInput(editorsInfo); 52 53 PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.EDITORS_DIALOG); 55 56 Dialog.applyDialogFont(parent); 57 58 return parent; 59 } 60 64 private void createMessageArea(Composite parent) { 65 Label label = new Label(parent, SWT.NONE); 66 label.setText(CVSUIMessages.EditorsDialog_question); } 68 69 } 70 | Popular Tags |