package org.eclipse.emf.exporter.ui; import org.eclipse.core.resources.IFile; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.wizard.IWizard; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbench; import org.eclipse.emf.converter.ui.OpenWizardActionDelegate; /** * Exports a GenModel file and the Ecore files behind it. * @since 2.2.0 */ public class GenModelExportActionDelegate extends OpenWizardActionDelegate { @Override protected IWizard createWizard(IWorkbench workbench, Shell shell, IFile file) { EMFExportWizard wizard = new EMFExportWizard(file); wizard.init(workbench, new StructuredSelection(file)); return wizard; } }
package org.eclipse.emf.importer.ui; import org.eclipse.core.resources.IFile; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.wizard.IWizard; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbench; import org.eclipse.emf.converter.ui.OpenWizardActionDelegate; /** * Reloads a GenModel file and the Ecore files behind it. * @since 2.1.0 */ public class GenModelReloadActionDelegate extends OpenWizardActionDelegate { @Override protected IWizard createWizard(IWorkbench workbench, Shell shell, IFile file) { EMFModelWizard wizard = new EMFModelWizard(file); wizard.init(workbench, new StructuredSelection(file)); return wizard; } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/exporter/ui/GenModelExportActionDelegate.java File path: /emf-2.4.1/src/org/eclipse/emf/importer/ui/GenModelReloadActionDelegate.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
package org.eclipse.emf.exporter.ui;
1
package org.eclipse.emf.importer.ui;
2
import org.eclipse.core.resources.IFile;
2
import org.eclipse.core.resources.IFile;
3
import org.eclipse.jface.viewers.StructuredSelection;
3
import org.eclipse.jface.viewers.StructuredSelection;
4
import org.eclipse.jface.wizard.IWizard;
4
import org.eclipse.jface.wizard.IWizard;
5
import org.eclipse.swt.widgets.Shell;
5
import org.eclipse.swt.widgets.Shell;
6
import org.eclipse.ui.IWorkbench;
6
import org.eclipse.ui.IWorkbench;
7
import org.eclipse.emf.converter.ui.OpenWizardActionDelegate;
7
import org.eclipse.emf.converter.ui.OpenWizardActionDelegate;
8
/**
8
/**
9
 * Exports a GenModel file and the Ecore files behind it.
9
 * Reloads a GenModel file and the Ecore files behind it.
10
 * @since 2.2.0
10
 * @since 2.1.0
11
 */
11
 */
12
public class GenModelExportActionDelegate extends OpenWizardActionDelegate
12
public class GenModelReloadActionDelegate extends OpenWizardActionDelegate
13
{
13
{
14
  @Override
14
  @Override
15
  protected IWizard createWizard(IWorkbench workbench, Shell shell, IFile file)
15
  protected IWizard createWizard(IWorkbench workbench, Shell shell, IFile file)
16
  {
16
  {
17
    EMFExportWizard wizard = new EMFExportWizard(file);
17
    EMFModelWizard wizard = new EMFModelWizard(file);
18
    wizard.init(workbench, new StructuredSelection(file));
18
    wizard.init(workbench, new StructuredSelection(file));
19
    return wizard;
19
    return wizard;
20
  }
20
  }
21
}
21
}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0