Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderModelWizard.java')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderModelWizard.java116
1 files changed, 60 insertions, 56 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderModelWizard.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderModelWizard.java
index 4d775a8e58f..56680aac045 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderModelWizard.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderModelWizard.java
@@ -79,7 +79,6 @@ import org.eclipse.ui.part.ISetSelectionTarget;
* @generated
*/
public class NattableaxisproviderModelWizard extends Wizard implements INewWizard {
-
/**
* The supported extensions for created files.
* <!-- begin-user-doc -->
@@ -87,7 +86,8 @@ public class NattableaxisproviderModelWizard extends Wizard implements INewWizar
*
* @generated
*/
- public static final List<String> FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisproviderEditorFilenameExtensions").split("\\s*,\\s*"))); //$NON-NLS-1$ //$NON-NLS-2$
+ public static final List<String> FILE_EXTENSIONS =
+ Collections.unmodifiableList(Arrays.asList(NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisproviderEditorFilenameExtensions").split("\\s*,\\s*"))); //$NON-NLS-1$ //$NON-NLS-2$
/**
* A formatted list of supported file extensions, suitable for display.
@@ -96,7 +96,8 @@ public class NattableaxisproviderModelWizard extends Wizard implements INewWizar
*
* @generated
*/
- public static final String FORMATTED_FILE_EXTENSIONS = NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisproviderEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ public static final String FORMATTED_FILE_EXTENSIONS =
+ NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisproviderEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
/**
* This caches an instance of the model package.
@@ -228,42 +229,44 @@ public class NattableaxisproviderModelWizard extends Wizard implements INewWizar
// Do the work within an operation.
//
- WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
-
- @Override
- protected void execute(IProgressMonitor progressMonitor) {
- try {
- // Create a resource set
- //
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Get the URI of the model file.
- //
- URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
-
- // Create a resource for this file.
- //
- Resource resource = resourceSet.createResource(fileURI);
-
- // Add the initial model object to the contents.
- //
- EObject rootObject = createInitialModel();
- if (rootObject != null) {
- resource.getContents().add(rootObject);
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ }
+ catch (Exception exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
+ }
+ finally {
+ progressMonitor.done();
+ }
}
-
- // Save the contents of the resource to the file system.
- //
- Map<Object, Object> options = new HashMap<Object, Object>();
- options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
- resource.save(options);
- } catch (Exception exception) {
- NattableEditorPlugin.INSTANCE.log(exception);
- } finally {
- progressMonitor.done();
- }
- }
- };
+ };
getContainer().run(false, false, operation);
@@ -274,19 +277,21 @@ public class NattableaxisproviderModelWizard extends Wizard implements INewWizar
final IWorkbenchPart activePart = page.getActivePart();
if (activePart instanceof ISetSelectionTarget) {
final ISelection targetSelection = new StructuredSelection(modelFile);
- getShell().getDisplay().asyncExec(new Runnable() {
-
- @Override
- public void run() {
- ((ISetSelectionTarget) activePart).selectReveal(targetSelection);
- }
- });
+ getShell().getDisplay().asyncExec
+ (new Runnable() {
+ @Override
+ public void run() {
+ ((ISetSelectionTarget) activePart).selectReveal(targetSelection);
+ }
+ });
}
// Open an editor on the new file.
//
try {
- page.openEditor(new FileEditorInput(modelFile), workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ page.openEditor
+ (new FileEditorInput(modelFile),
+ workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
} catch (PartInitException exception) {
MessageDialog.openError(workbenchWindow.getShell(), NattableEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); //$NON-NLS-1$
return false;
@@ -307,7 +312,6 @@ public class NattableaxisproviderModelWizard extends Wizard implements INewWizar
* @generated
*/
public class NattableaxisproviderModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
-
/**
* Pass in the selection.
* <!-- begin-user-doc -->
@@ -359,7 +363,6 @@ public class NattableaxisproviderModelWizard extends Wizard implements INewWizar
* @generated
*/
public class NattableaxisproviderModelWizardInitialObjectCreationPage extends WizardPage {
-
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -475,13 +478,13 @@ public class NattableaxisproviderModelWizard extends Wizard implements INewWizar
*
* @generated
*/
- protected ModifyListener validator = new ModifyListener() {
-
- @Override
- public void modifyText(ModifyEvent e) {
- setPageComplete(validatePage());
- }
- };
+ protected ModifyListener validator =
+ new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
/**
* <!-- begin-user-doc -->
@@ -506,7 +509,8 @@ public class NattableaxisproviderModelWizard extends Wizard implements INewWizar
if (initialObjectField.getItemCount() == 1) {
initialObjectField.clearSelection();
encodingField.setFocus();
- } else {
+ }
+ else {
encodingField.clearSelection();
initialObjectField.setFocus();
}

Back to the top