diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui.efs')
6 files changed, 249 insertions, 249 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui.efs/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.ui.efs/.settings/org.eclipse.core.resources.prefs index 44fcd4d9ea..f48a434bff 100644 --- a/plugins/org.eclipse.emf.cdo.ui.efs/.settings/org.eclipse.core.resources.prefs +++ b/plugins/org.eclipse.emf.cdo.ui.efs/.settings/org.eclipse.core.resources.prefs @@ -1,3 +1,3 @@ -#Mon Jul 04 12:52:29 CEST 2011
-eclipse.preferences.version=1
-encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
+#Mon Jul 04 12:52:29 CEST 2011 +eclipse.preferences.version=1 +encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8 diff --git a/plugins/org.eclipse.emf.cdo.ui.efs/copyright.txt b/plugins/org.eclipse.emf.cdo.ui.efs/copyright.txt index 9cbb3ba084..cea141de92 100644 --- a/plugins/org.eclipse.emf.cdo.ui.efs/copyright.txt +++ b/plugins/org.eclipse.emf.cdo.ui.efs/copyright.txt @@ -1,8 +1,8 @@ -Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: Martin Fluegge - initial API and implementation
\ No newline at end of file diff --git a/plugins/org.eclipse.emf.cdo.ui.efs/plugin.properties b/plugins/org.eclipse.emf.cdo.ui.efs/plugin.properties index 084f4a1a85..93476ce534 100644 --- a/plugins/org.eclipse.emf.cdo.ui.efs/plugin.properties +++ b/plugins/org.eclipse.emf.cdo.ui.efs/plugin.properties @@ -1,14 +1,14 @@ -# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
-# Martin Fluegge - initial API and implementation
-
-pluginName = CDO Model Repository Client UI EFS Support
-providerName = Eclipse Modeling Project
-
-
-wizard.name.0=Import CDO Project
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: +# Martin Fluegge - initial API and implementation + +pluginName = CDO Model Repository Client UI EFS Support +providerName = Eclipse Modeling Project + + +wizard.name.0=Import CDO Project diff --git a/plugins/org.eclipse.emf.cdo.ui.efs/plugin.xml b/plugins/org.eclipse.emf.cdo.ui.efs/plugin.xml index 6fe53304e0..935594fc1a 100644 --- a/plugins/org.eclipse.emf.cdo.ui.efs/plugin.xml +++ b/plugins/org.eclipse.emf.cdo.ui.efs/plugin.xml @@ -1,26 +1,26 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<!--
- Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- Eike Stepper - initial API and implementation
--->
-
-<plugin>
-
- <extension
- point="org.eclipse.ui.importWizards">
- <wizard
- class="org.eclipse.emf.cdo.ui.efs.wizards.CDOProjectImportWizard"
- icon="icons/full/obj16/repository_content.gif"
- id="org.eclipse.emf.cdo.ui.efs.wizard.import"
- name="%wizard.name.0">
- </wizard>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<!-- + Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + Eike Stepper - initial API and implementation +--> + +<plugin> + + <extension + point="org.eclipse.ui.importWizards"> + <wizard + class="org.eclipse.emf.cdo.ui.efs.wizards.CDOProjectImportWizard" + icon="icons/full/obj16/repository_content.gif" + id="org.eclipse.emf.cdo.ui.efs.wizard.import" + name="%wizard.name.0"> + </wizard> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java b/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java index 9ec73f11cb..bff3cb1311 100644 --- a/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java +++ b/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/efs/wizards/CDOProjectImportWizard.java @@ -1,139 +1,139 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.ui.efs.wizards;
-
-import org.eclipse.net4j.util.ui.UIUtil;
-import org.eclipse.net4j.util.ui.ValidationContext;
-import org.eclipse.net4j.util.ui.container.ElementWizardComposite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-
-import java.net.URI;
-
-/**
- * @author Martin Fluegge
- */
-public class CDOProjectImportWizard extends Wizard implements IImportWizard
-{
- public CDOProjectImportWizard()
- {
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection)
- {
- }
-
- @Override
- public boolean performFinish()
- {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
- String projectName = "cdo_test1";
- IProject project = workspace.getRoot().getProject(projectName);
- if (project.exists())
- {
- return false;
- }
-
- IProjectDescription description = workspace.newProjectDescription(projectName);
- description.setLocationURI(URI.create("cdo.net4j.tcp://localhost/repo1/MAIN/@"));
-
- try
- {
- project.create(description, new NullProgressMonitor());
- if (!project.isOpen())
- {
- project.open(new NullProgressMonitor());
- }
- }
- catch (CoreException ex)
- {
- ex.printStackTrace();
- return false;
- }
-
- return true;
- }
-
- @Override
- public void addPages()
- {
- addPage(new Page());
- }
-
- /**
- * @author Eike Stepper
- */
- public static class Page extends WizardPage implements ValidationContext
- {
- public Page()
- {
- super("CDOProjectImportWizardPage");
- }
-
- public void createControl(Composite parent)
- {
- Composite composite = new Composite(parent, SWT.FILL);
- // FillLayout layout = new FillLayout(SWT.VERTICAL);
- GridLayout layout = new GridLayout(1, true);
-
- composite.setLayout(layout);
- // composite.setLayout(new GridLayout(1, true));
-
- Group repositoryGroup = new Group(composite, SWT.NONE);
- repositoryGroup.setLayout(new GridLayout(2, false));
- repositoryGroup.setLayoutData(UIUtil.createGridData(true, false));
-
- createRepositoryControl(repositoryGroup);
-
- Group group = new Group(composite, SWT.NONE);
- group.setText("Connection");
- group.setLayout(new FillLayout());
- group.setLayoutData(UIUtil.createGridData(true, true));
-
- new ElementWizardComposite.WithRadios(group, SWT.NONE, "org.eclipse.net4j.connectors", "Type:");
- setControl(group);
- }
-
- private void createRepositoryControl(Composite parent)
- {
- Label repositoryLabel = new Label(parent, SWT.NONE);
- repositoryLabel.setText("Repository:");
- repositoryLabel.setLayoutData(UIUtil.createGridData(false, false));
-
- Text repositoryText = new Text(parent, SWT.BORDER);
- repositoryText.setLayoutData(UIUtil.createGridData(true, false));
- }
-
- public void setValidationError(Object source, String message)
- {
- setMessage(message, IMessageProvider.ERROR);
- }
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.ui.efs.wizards; + +import org.eclipse.net4j.util.ui.UIUtil; +import org.eclipse.net4j.util.ui.ValidationContext; +import org.eclipse.net4j.util.ui.container.ElementWizardComposite; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.jface.dialogs.IMessageProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.IImportWizard; +import org.eclipse.ui.IWorkbench; + +import java.net.URI; + +/** + * @author Martin Fluegge + */ +public class CDOProjectImportWizard extends Wizard implements IImportWizard +{ + public CDOProjectImportWizard() + { + } + + public void init(IWorkbench workbench, IStructuredSelection selection) + { + } + + @Override + public boolean performFinish() + { + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + + String projectName = "cdo_test1"; + IProject project = workspace.getRoot().getProject(projectName); + if (project.exists()) + { + return false; + } + + IProjectDescription description = workspace.newProjectDescription(projectName); + description.setLocationURI(URI.create("cdo.net4j.tcp://localhost/repo1/MAIN/@")); + + try + { + project.create(description, new NullProgressMonitor()); + if (!project.isOpen()) + { + project.open(new NullProgressMonitor()); + } + } + catch (CoreException ex) + { + ex.printStackTrace(); + return false; + } + + return true; + } + + @Override + public void addPages() + { + addPage(new Page()); + } + + /** + * @author Eike Stepper + */ + public static class Page extends WizardPage implements ValidationContext + { + public Page() + { + super("CDOProjectImportWizardPage"); + } + + public void createControl(Composite parent) + { + Composite composite = new Composite(parent, SWT.FILL); + // FillLayout layout = new FillLayout(SWT.VERTICAL); + GridLayout layout = new GridLayout(1, true); + + composite.setLayout(layout); + // composite.setLayout(new GridLayout(1, true)); + + Group repositoryGroup = new Group(composite, SWT.NONE); + repositoryGroup.setLayout(new GridLayout(2, false)); + repositoryGroup.setLayoutData(UIUtil.createGridData(true, false)); + + createRepositoryControl(repositoryGroup); + + Group group = new Group(composite, SWT.NONE); + group.setText("Connection"); + group.setLayout(new FillLayout()); + group.setLayoutData(UIUtil.createGridData(true, true)); + + new ElementWizardComposite.WithRadios(group, SWT.NONE, "org.eclipse.net4j.connectors", "Type:"); + setControl(group); + } + + private void createRepositoryControl(Composite parent) + { + Label repositoryLabel = new Label(parent, SWT.NONE); + repositoryLabel.setText("Repository:"); + repositoryLabel.setLayoutData(UIUtil.createGridData(false, false)); + + Text repositoryText = new Text(parent, SWT.BORDER); + repositoryText.setLayoutData(UIUtil.createGridData(true, false)); + } + + public void setValidationError(Object source, String message) + { + setMessage(message, IMessageProvider.ERROR); + } + } +} diff --git a/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/internal/efs/bundle/OM.java b/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/internal/efs/bundle/OM.java index 650ec9ec8a..0cab0e2b48 100644 --- a/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/internal/efs/bundle/OM.java +++ b/plugins/org.eclipse.emf.cdo.ui.efs/src/org/eclipse/emf/cdo/ui/internal/efs/bundle/OM.java @@ -1,60 +1,60 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- * Victor Roldan Betancort - maintenance
- */
-package org.eclipse.emf.cdo.ui.internal.efs.bundle;
-
-import org.eclipse.net4j.util.om.OMBundle;
-import org.eclipse.net4j.util.om.OMPlatform;
-import org.eclipse.net4j.util.om.log.OMLogger;
-import org.eclipse.net4j.util.om.trace.OMTracer;
-import org.eclipse.net4j.util.ui.UIActivator;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * The <em>Operations & Maintenance</em> class of this bundle.
- *
- * @author Martin Fluegge
- */
-public abstract class OM
-{
- public static final String BUNDLE_ID = "org.eclipse.emf.cdo.ui.efs"; //$NON-NLS-1$
-
- public static final String ERROR_ICON = "icons/full/elcl16/error.gif"; //$NON-NLS-1$
-
- public static final String WARNING_ICON = "icons/full/elcl16/warning.gif"; //$NON-NLS-1$
-
- public static final String INFO_ICON = "icons/full/elcl16/info.gif"; //$NON-NLS-1$
-
- public static final String BRANCH_ICON = "icons/full/obj16/branch.png"; //$NON-NLS-1$
-
- public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
-
- public static final OMLogger LOG = BUNDLE.logger();
-
- public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
-
- public static ImageDescriptor getImageDescriptor(String imageFilePath)
- {
- return Activator.imageDescriptorFromPlugin(BUNDLE_ID, imageFilePath);
- }
-
- /**
- * @author Eike Stepper
- */
- public static final class Activator extends UIActivator
- {
- public Activator()
- {
- super(BUNDLE);
- }
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * Victor Roldan Betancort - maintenance + */ +package org.eclipse.emf.cdo.ui.internal.efs.bundle; + +import org.eclipse.net4j.util.om.OMBundle; +import org.eclipse.net4j.util.om.OMPlatform; +import org.eclipse.net4j.util.om.log.OMLogger; +import org.eclipse.net4j.util.om.trace.OMTracer; +import org.eclipse.net4j.util.ui.UIActivator; + +import org.eclipse.jface.resource.ImageDescriptor; + +/** + * The <em>Operations & Maintenance</em> class of this bundle. + * + * @author Martin Fluegge + */ +public abstract class OM +{ + public static final String BUNDLE_ID = "org.eclipse.emf.cdo.ui.efs"; //$NON-NLS-1$ + + public static final String ERROR_ICON = "icons/full/elcl16/error.gif"; //$NON-NLS-1$ + + public static final String WARNING_ICON = "icons/full/elcl16/warning.gif"; //$NON-NLS-1$ + + public static final String INFO_ICON = "icons/full/elcl16/info.gif"; //$NON-NLS-1$ + + public static final String BRANCH_ICON = "icons/full/obj16/branch.png"; //$NON-NLS-1$ + + public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class); + + public static final OMLogger LOG = BUNDLE.logger(); + + public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$ + + public static ImageDescriptor getImageDescriptor(String imageFilePath) + { + return Activator.imageDescriptorFromPlugin(BUNDLE_ID, imageFilePath); + } + + /** + * @author Eike Stepper + */ + public static final class Activator extends UIActivator + { + public Activator() + { + super(BUNDLE); + } + } +} |