aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2011-04-22 14:15:40 (EDT)
committerChris Aniszczyk2011-04-22 14:15:58 (EDT)
commitf4c29ad7fbf64ecf50366b2b6eadebf6ec5c22f1 (patch)
tree4ad3360c0bf233c8e5452dde61661187469fc5bd
parent299ba05d00971020cee5a8a98cae6e3635701fe1 (diff)
downloadegit-pde-f4c29ad7fbf64ecf50366b2b6eadebf6ec5c22f1.zip
egit-pde-f4c29ad7fbf64ecf50366b2b6eadebf6ec5c22f1.tar.gz
egit-pde-f4c29ad7fbf64ecf50366b2b6eadebf6ec5c22f1.tar.bz2
Add MapFileComparePagerefs/changes/20/3220/1
Change-Id: I4e03415a194cdc094026ac7af1487ece228d5c05 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rwxr-xr-xorg.eclipse.egit.relengtools/src/org/eclipse/egit/internal/relengtools/MapFileComparePage.java92
1 files changed, 92 insertions, 0 deletions
diff --git a/org.eclipse.egit.relengtools/src/org/eclipse/egit/internal/relengtools/MapFileComparePage.java b/org.eclipse.egit.relengtools/src/org/eclipse/egit/internal/relengtools/MapFileComparePage.java
new file mode 100755
index 0000000..4e85dcb
--- /dev/null
+++ b/org.eclipse.egit.relengtools/src/org/eclipse/egit/internal/relengtools/MapFileComparePage.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.egit.internal.relengtools;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class MapFileComparePage extends WizardPage {
+
+ private final MapFileCompareEditorInput input = new MapFileCompareEditorInput();
+
+ private String tag;
+
+ public MapFileComparePage(String pageName, String title,
+ ImageDescriptor image) {
+ super(pageName, title, image);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ // Need to handle input and rebuild tree only when becoming visible
+ if (visible) {
+ try {
+ input.updateInput(
+ ((ReleaseWizard) getWizard()).getSelectedProjects(),
+ tag);
+ } catch (final CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets
+ * .Composite)
+ */
+ @Override
+ public void createControl(Composite parent) {
+ final Font font = parent.getFont();
+ final Composite composite = new Composite(parent, SWT.NONE);
+ composite.setFont(font);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ try {
+ input.run(null);
+ } catch (final InterruptedException e) {
+ e.printStackTrace();
+ } catch (final InvocationTargetException e) {
+ e.printStackTrace();
+ }
+
+ final Control c = input.createContents(composite);
+ c.setLayoutData(new GridData(GridData.FILL_BOTH));
+ setControl(composite);
+ }
+
+ public void setTag(String t) {
+ this.tag = t;
+ }
+
+ public void updateMapProject(MapProject m) {
+ input.updateMapProject(m);
+ }
+}