diff options
author | Eike Stepper | 2010-10-18 04:40:35 +0000 |
---|---|---|
committer | Eike Stepper | 2010-10-18 04:40:35 +0000 |
commit | 89bd55d0c28776519fd64099969024510618d66f (patch) | |
tree | 513a542811fc577536fab5989ddf6cf02c1e770c /plugins/org.eclipse.emf.cdo.ui.location | |
parent | bca08a9d9f75251f399e95baa65a54fe17c451f8 (diff) | |
download | cdo-89bd55d0c28776519fd64099969024510618d66f.tar.gz cdo-89bd55d0c28776519fd64099969024510618d66f.tar.xz cdo-89bd55d0c28776519fd64099969024510618d66f.zip |
[327405] Provide an offline CDOWorkspace with Checkout/Update/Commit workflows
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327405
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui.location')
2 files changed, 28 insertions, 7 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui.location/src/org/eclipse/emf/cdo/ui/internal/location/NewRepositoryLocationDialog.java b/plugins/org.eclipse.emf.cdo.ui.location/src/org/eclipse/emf/cdo/ui/internal/location/NewRepositoryLocationDialog.java index 88beb0b5a2..874be6d8f3 100644 --- a/plugins/org.eclipse.emf.cdo.ui.location/src/org/eclipse/emf/cdo/ui/internal/location/NewRepositoryLocationDialog.java +++ b/plugins/org.eclipse.emf.cdo.ui.location/src/org/eclipse/emf/cdo/ui/internal/location/NewRepositoryLocationDialog.java @@ -1,20 +1,24 @@ package org.eclipse.emf.cdo.ui.internal.location; +import org.eclipse.net4j.util.container.IPluginContainer; +import org.eclipse.net4j.util.ui.container.ElementWizardComposite; + import org.eclipse.jface.dialogs.TitleAreaDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbenchPage; /** * @author Eike Stepper */ public class NewRepositoryLocationDialog extends TitleAreaDialog { - public NewRepositoryLocationDialog(IWorkbenchPage page) + private ElementWizardComposite connectorWizard; + + public NewRepositoryLocationDialog(Shell parentShell) { - super(page.getWorkbenchWindow().getShell()); + super(parentShell); setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL | SWT.MAX | SWT.TITLE | SWT.RESIZE); } @@ -31,6 +35,18 @@ public class NewRepositoryLocationDialog extends TitleAreaDialog setTitle("New Repository Location"); // setTitleImage(SharedIcons.getImage(SharedIcons.WIZBAN_PACKAGE_MANAGER)); - return null; + connectorWizard = new ElementWizardComposite.WithRadios(parent, SWT.NONE, "org.eclipse.net4j.connectors", + "Connector:"); + // IPluginContainer container = getContainer(); + // connectorWizard = (IElementWizard)container.getElement("org.eclipse.net4j.util.ui.elementWizards", + // "org.eclipse.net4j.connectors", null); + // + // connectorWizard.create(parent, container, "org.eclipse.net4j.connectors", "", "", null); + return connectorWizard; + } + + protected IPluginContainer getContainer() + { + return IPluginContainer.INSTANCE; } } diff --git a/plugins/org.eclipse.emf.cdo.ui.location/src/org/eclipse/emf/cdo/ui/internal/location/RepositoryLocationsView.java b/plugins/org.eclipse.emf.cdo.ui.location/src/org/eclipse/emf/cdo/ui/internal/location/RepositoryLocationsView.java index 232aa8a2e1..abe997caa8 100644 --- a/plugins/org.eclipse.emf.cdo.ui.location/src/org/eclipse/emf/cdo/ui/internal/location/RepositoryLocationsView.java +++ b/plugins/org.eclipse.emf.cdo.ui.location/src/org/eclipse/emf/cdo/ui/internal/location/RepositoryLocationsView.java @@ -30,6 +30,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IActionBars; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.IWorkbenchActionConstants; @@ -139,12 +140,16 @@ public class RepositoryLocationsView extends ViewPart @Override public void run() { - showMessage("Action 1 executed"); + Shell shell = RepositoryLocationsView.this.getSite().getShell(); + NewRepositoryLocationDialog dialog = new NewRepositoryLocationDialog(shell); + if (dialog.open() == NewRepositoryLocationDialog.OK) + { + } } }; - newAction.setText("Action 1"); - newAction.setToolTipText("Action 1 tooltip"); + newAction.setText("New Location"); + newAction.setToolTipText("Add a new repository location"); newAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages() .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK)); |