KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > EditorsDialog


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * CSC - Intial implementation
10  * IBM Corporation - ongoing maintenance
11  *******************************************************************************/

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 /**
22  *
23  * A dialog for showing the result of a cvs editors command.
24  * Currently not in use, but can be used before executing the edit command
25  *
26  * @author <a HREF="mailto:gregor.kohlwes@csc.com,kohlwes@gmx.net">Gregor Kohlwes</a>
27  */

28 public class EditorsDialog extends TrayDialog {
29     /**
30      * Constructor EditorsDialog.
31      * @param shell
32      * @param iEditorsInfos
33      */

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         // set F1 help
54
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.EDITORS_DIALOG);
55         
56         Dialog.applyDialogFont(parent);
57
58         return parent;
59     }
60     /**
61      * Method createMessageArea.
62      * @param parent
63      */

64     private void createMessageArea(Composite parent) {
65         Label label = new Label(parent, SWT.NONE);
66         label.setText(CVSUIMessages.EditorsDialog_question); //
67
}
68     
69 }
70
Popular Tags