EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.presentation]

COVERAGE SUMMARY FOR SOURCE FILE [QMLProfileModelWizard.java]

nameclass, %method, %block, %line, %
QMLProfileModelWizard.java0%   (0/6)0%   (0/25)0%   (0/807)0%   (0/173)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class QMLProfileModelWizard0%   (0/1)0%   (0/8)0%   (0/336)0%   (0/70)
<static initializer> 0%   (0/1)0%   (0/16)0%   (0/5)
QMLProfileModelWizard (): void 0%   (0/1)0%   (0/11)0%   (0/3)
addPages (): void 0%   (0/1)0%   (0/149)0%   (0/24)
createInitialModel (): EObject 0%   (0/1)0%   (0/15)0%   (0/3)
getInitialObjectNames (): Collection 0%   (0/1)0%   (0/44)0%   (0/9)
getModelFile (): IFile 0%   (0/1)0%   (0/4)0%   (0/1)
init (IWorkbench, IStructuredSelection): void 0%   (0/1)0%   (0/19)0%   (0/5)
performFinish (): boolean 0%   (0/1)0%   (0/78)0%   (0/21)
     
class QMLProfileModelWizard$10%   (0/1)0%   (0/2)0%   (0/66)0%   (0/17)
QMLProfileModelWizard$1 (QMLProfileModelWizard, IFile): void 0%   (0/1)0%   (0/9)0%   (0/2)
execute (IProgressMonitor): void 0%   (0/1)0%   (0/57)0%   (0/15)
     
class QMLProfileModelWizard$20%   (0/1)0%   (0/2)0%   (0/19)0%   (0/4)
QMLProfileModelWizard$2 (QMLProfileModelWizard, IWorkbenchPart, ISelection): ... 0%   (0/1)0%   (0/12)0%   (0/2)
run (): void 0%   (0/1)0%   (0/7)0%   (0/2)
     
class QMLProfileModelWizard$QMLProfileModelWizardInitialObjectCreationPage0%   (0/1)0%   (0/8)0%   (0/315)0%   (0/71)
QMLProfileModelWizard$QMLProfileModelWizardInitialObjectCreationPage (QMLProf... 0%   (0/1)0%   (0/13)0%   (0/5)
createControl (Composite): void 0%   (0/1)0%   (0/185)0%   (0/42)
getEncoding (): String 0%   (0/1)0%   (0/4)0%   (0/1)
getEncodings (): Collection 0%   (0/1)0%   (0/28)0%   (0/5)
getInitialObjectName (): String 0%   (0/1)0%   (0/27)0%   (0/5)
getLabel (String): String 0%   (0/1)0%   (0/18)0%   (0/4)
setVisible (boolean): void 0%   (0/1)0%   (0/26)0%   (0/8)
validatePage (): boolean 0%   (0/1)0%   (0/14)0%   (0/1)
     
class QMLProfileModelWizard$QMLProfileModelWizardInitialObjectCreationPage$10%   (0/1)0%   (0/2)0%   (0/13)0%   (0/4)
QMLProfileModelWizard$QMLProfileModelWizardInitialObjectCreationPage$1 (QMLPr... 0%   (0/1)0%   (0/6)0%   (0/2)
modifyText (ModifyEvent): void 0%   (0/1)0%   (0/7)0%   (0/2)
     
class QMLProfileModelWizard$QMLProfileModelWizardNewFileCreationPage0%   (0/1)0%   (0/3)0%   (0/58)0%   (0/12)
QMLProfileModelWizard$QMLProfileModelWizardNewFileCreationPage (QMLProfileMod... 0%   (0/1)0%   (0/8)0%   (0/3)
getModelFile (): IFile 0%   (0/1)0%   (0/9)0%   (0/1)
validatePage (): boolean 0%   (0/1)0%   (0/41)0%   (0/8)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.presentation;
8 
9 
10import java.util.ArrayList;
11import java.util.Arrays;
12import java.util.Collection;
13import java.util.Collections;
14import java.util.HashMap;
15import java.util.List;
16import java.util.Map;
17import java.util.MissingResourceException;
18import java.util.StringTokenizer;
19 
20import org.eclipse.emf.common.CommonPlugin;
21 
22import org.eclipse.emf.common.util.URI;
23 
24import org.eclipse.emf.ecore.EClass;
25import org.eclipse.emf.ecore.EClassifier;
26 
27import org.eclipse.emf.ecore.resource.Resource;
28import org.eclipse.emf.ecore.resource.ResourceSet;
29 
30import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
31 
32import org.eclipse.emf.ecore.EObject;
33 
34import org.eclipse.emf.ecore.xmi.XMLResource;
35 
36import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
37 
38import org.eclipse.core.resources.IContainer;
39import org.eclipse.core.resources.IFile;
40import org.eclipse.core.resources.IFolder;
41import org.eclipse.core.resources.IProject;
42import org.eclipse.core.resources.IResource;
43import org.eclipse.core.resources.ResourcesPlugin;
44 
45import org.eclipse.core.runtime.IProgressMonitor;
46 
47import org.eclipse.jface.dialogs.MessageDialog;
48 
49import org.eclipse.jface.viewers.IStructuredSelection;
50 
51import org.eclipse.jface.wizard.Wizard;
52import org.eclipse.jface.wizard.WizardPage;
53 
54import org.eclipse.swt.SWT;
55 
56import org.eclipse.swt.events.ModifyListener;
57import org.eclipse.swt.events.ModifyEvent;
58 
59import org.eclipse.swt.layout.GridData;
60import org.eclipse.swt.layout.GridLayout;
61 
62import org.eclipse.swt.widgets.Combo;
63import org.eclipse.swt.widgets.Composite;
64import org.eclipse.swt.widgets.Label;
65 
66import org.eclipse.ui.INewWizard;
67import org.eclipse.ui.IWorkbench;
68 
69import org.eclipse.ui.actions.WorkspaceModifyOperation;
70 
71import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
72 
73import org.eclipse.ui.part.FileEditorInput;
74import org.eclipse.ui.part.ISetSelectionTarget;
75 
76import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.QMLProfileFactory;
77import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.QMLProfilePackage;
78import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.provider.QMLProfileEditPlugin;
79 
80 
81import org.eclipse.core.runtime.Path;
82 
83import org.eclipse.jface.viewers.ISelection;
84import org.eclipse.jface.viewers.StructuredSelection;
85 
86import org.eclipse.ui.IWorkbenchPage;
87import org.eclipse.ui.IWorkbenchPart;
88import org.eclipse.ui.IWorkbenchWindow;
89import org.eclipse.ui.PartInitException;
90 
91 
92/**
93 * This is a simple wizard for creating a new model file.
94 * <!-- begin-user-doc -->
95 * <!-- end-user-doc -->
96 * @generated
97 */
98public class QMLProfileModelWizard extends Wizard implements INewWizard {
99        /**
100         * The supported extensions for created files.
101         * <!-- begin-user-doc -->
102         * <!-- end-user-doc -->
103         * @generated
104         */
105        public static final List<String> FILE_EXTENSIONS =
106                Collections.unmodifiableList(Arrays.asList(QMLProfileEditorPlugin.INSTANCE.getString("_UI_QMLProfileEditorFilenameExtensions").split("\\s*,\\s*")));
107 
108        /**
109         * A formatted list of supported file extensions, suitable for display.
110         * <!-- begin-user-doc -->
111         * <!-- end-user-doc -->
112         * @generated
113         */
114        public static final String FORMATTED_FILE_EXTENSIONS =
115                QMLProfileEditorPlugin.INSTANCE.getString("_UI_QMLProfileEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
116 
117        /**
118         * This caches an instance of the model package.
119         * <!-- begin-user-doc -->
120         * <!-- end-user-doc -->
121         * @generated
122         */
123        protected QMLProfilePackage qmlProfilePackage = QMLProfilePackage.eINSTANCE;
124 
125        /**
126         * This caches an instance of the model factory.
127         * <!-- begin-user-doc -->
128         * <!-- end-user-doc -->
129         * @generated
130         */
131        protected QMLProfileFactory qmlProfileFactory = qmlProfilePackage.getQMLProfileFactory();
132 
133        /**
134         * This is the file creation page.
135         * <!-- begin-user-doc -->
136         * <!-- end-user-doc -->
137         * @generated
138         */
139        protected QMLProfileModelWizardNewFileCreationPage newFileCreationPage;
140 
141        /**
142         * This is the initial object creation page.
143         * <!-- begin-user-doc -->
144         * <!-- end-user-doc -->
145         * @generated
146         */
147        protected QMLProfileModelWizardInitialObjectCreationPage initialObjectCreationPage;
148 
149        /**
150         * Remember the selection during initialization for populating the default container.
151         * <!-- begin-user-doc -->
152         * <!-- end-user-doc -->
153         * @generated
154         */
155        protected IStructuredSelection selection;
156 
157        /**
158         * Remember the workbench during initialization.
159         * <!-- begin-user-doc -->
160         * <!-- end-user-doc -->
161         * @generated
162         */
163        protected IWorkbench workbench;
164 
165        /**
166         * Caches the names of the types that can be created as the root object.
167         * <!-- begin-user-doc -->
168         * <!-- end-user-doc -->
169         * @generated
170         */
171        protected List<String> initialObjectNames;
172 
173        /**
174         * This just records the information.
175         * <!-- begin-user-doc -->
176         * <!-- end-user-doc -->
177         * @generated
178         */
179        public void init(IWorkbench workbench, IStructuredSelection selection) {
180                this.workbench = workbench;
181                this.selection = selection;
182                setWindowTitle(QMLProfileEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
183                setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(QMLProfileEditorPlugin.INSTANCE.getImage("full/wizban/NewQMLProfile")));
184        }
185 
186        /**
187         * Returns the names of the types that can be created as the root object.
188         * <!-- begin-user-doc -->
189         * <!-- end-user-doc -->
190         * @generated
191         */
192        protected Collection<String> getInitialObjectNames() {
193                if (initialObjectNames == null) {
194                        initialObjectNames = new ArrayList<String>();
195                        for (EClassifier eClassifier : qmlProfilePackage.getEClassifiers()) {
196                                if (eClassifier instanceof EClass) {
197                                        EClass eClass = (EClass)eClassifier;
198                                        if (!eClass.isAbstract()) {
199                                                initialObjectNames.add(eClass.getName());
200                                        }
201                                }
202                        }
203                        Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
204                }
205                return initialObjectNames;
206        }
207 
208        /**
209         * Create a new model.
210         * <!-- begin-user-doc -->
211         * <!-- end-user-doc -->
212         * @generated
213         */
214        protected EObject createInitialModel() {
215                EClass eClass = (EClass)qmlProfilePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
216                EObject rootObject = qmlProfileFactory.create(eClass);
217                return rootObject;
218        }
219 
220        /**
221         * Do the work after everything is specified.
222         * <!-- begin-user-doc -->
223         * <!-- end-user-doc -->
224         * @generated
225         */
226        @Override
227        public boolean performFinish() {
228                try {
229                        // Remember the file.
230                        //
231                        final IFile modelFile = getModelFile();
232 
233                        // Do the work within an operation.
234                        //
235                        WorkspaceModifyOperation operation =
236                                new WorkspaceModifyOperation() {
237                                        @Override
238                                        protected void execute(IProgressMonitor progressMonitor) {
239                                                try {
240                                                        // Create a resource set
241                                                        //
242                                                        ResourceSet resourceSet = new ResourceSetImpl();
243 
244                                                        // Get the URI of the model file.
245                                                        //
246                                                        URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
247 
248                                                        // Create a resource for this file.
249                                                        //
250                                                        Resource resource = resourceSet.createResource(fileURI);
251 
252                                                        // Add the initial model object to the contents.
253                                                        //
254                                                        EObject rootObject = createInitialModel();
255                                                        if (rootObject != null) {
256                                                                resource.getContents().add(rootObject);
257                                                        }
258 
259                                                        // Save the contents of the resource to the file system.
260                                                        //
261                                                        Map<Object, Object> options = new HashMap<Object, Object>();
262                                                        options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
263                                                        resource.save(options);
264                                                }
265                                                catch (Exception exception) {
266                                                        QMLProfileEditorPlugin.INSTANCE.log(exception);
267                                                }
268                                                finally {
269                                                        progressMonitor.done();
270                                                }
271                                        }
272                                };
273 
274                        getContainer().run(false, false, operation);
275 
276                        // Select the new file resource in the current view.
277                        //
278                        IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
279                        IWorkbenchPage page = workbenchWindow.getActivePage();
280                        final IWorkbenchPart activePart = page.getActivePart();
281                        if (activePart instanceof ISetSelectionTarget) {
282                                final ISelection targetSelection = new StructuredSelection(modelFile);
283                                getShell().getDisplay().asyncExec
284                                        (new Runnable() {
285                                                 public void run() {
286                                                         ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
287                                                 }
288                                         });
289                        }
290 
291                        // Open an editor on the new file.
292                        //
293                        try {
294                                page.openEditor
295                                        (new FileEditorInput(modelFile),
296                                         workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
297                        }
298                        catch (PartInitException exception) {
299                                MessageDialog.openError(workbenchWindow.getShell(), QMLProfileEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
300                                return false;
301                        }
302 
303                        return true;
304                }
305                catch (Exception exception) {
306                        QMLProfileEditorPlugin.INSTANCE.log(exception);
307                        return false;
308                }
309        }
310 
311        /**
312         * This is the one page of the wizard.
313         * <!-- begin-user-doc -->
314         * <!-- end-user-doc -->
315         * @generated
316         */
317        public class QMLProfileModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
318                /**
319                 * Pass in the selection.
320                 * <!-- begin-user-doc -->
321                 * <!-- end-user-doc -->
322                 * @generated
323                 */
324                public QMLProfileModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
325                        super(pageId, selection);
326                }
327 
328                /**
329                 * The framework calls this to see if the file is correct.
330                 * <!-- begin-user-doc -->
331                 * <!-- end-user-doc -->
332                 * @generated
333                 */
334                @Override
335                protected boolean validatePage() {
336                        if (super.validatePage()) {
337                                String extension = new Path(getFileName()).getFileExtension();
338                                if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
339                                        String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
340                                        setErrorMessage(QMLProfileEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
341                                        return false;
342                                }
343                                return true;
344                        }
345                        return false;
346                }
347 
348                /**
349                 * <!-- begin-user-doc -->
350                 * <!-- end-user-doc -->
351                 * @generated
352                 */
353                public IFile getModelFile() {
354                        return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
355                }
356        }
357 
358        /**
359         * This is the page where the type of object to create is selected.
360         * <!-- begin-user-doc -->
361         * <!-- end-user-doc -->
362         * @generated
363         */
364        public class QMLProfileModelWizardInitialObjectCreationPage extends WizardPage {
365                /**
366                 * <!-- begin-user-doc -->
367                 * <!-- end-user-doc -->
368                 * @generated
369                 */
370                protected Combo initialObjectField;
371 
372                /**
373                 * @generated
374                 * <!-- begin-user-doc -->
375                 * <!-- end-user-doc -->
376                 */
377                protected List<String> encodings;
378 
379                /**
380                 * <!-- begin-user-doc -->
381                 * <!-- end-user-doc -->
382                 * @generated
383                 */
384                protected Combo encodingField;
385 
386                /**
387                 * Pass in the selection.
388                 * <!-- begin-user-doc -->
389                 * <!-- end-user-doc -->
390                 * @generated
391                 */
392                public QMLProfileModelWizardInitialObjectCreationPage(String pageId) {
393                        super(pageId);
394                }
395 
396                /**
397                 * <!-- begin-user-doc -->
398                 * <!-- end-user-doc -->
399                 * @generated
400                 */
401                public void createControl(Composite parent) {
402                        Composite composite = new Composite(parent, SWT.NONE);
403                        {
404                                GridLayout layout = new GridLayout();
405                                layout.numColumns = 1;
406                                layout.verticalSpacing = 12;
407                                composite.setLayout(layout);
408 
409                                GridData data = new GridData();
410                                data.verticalAlignment = GridData.FILL;
411                                data.grabExcessVerticalSpace = true;
412                                data.horizontalAlignment = GridData.FILL;
413                                composite.setLayoutData(data);
414                        }
415 
416                        Label containerLabel = new Label(composite, SWT.LEFT);
417                        {
418                                containerLabel.setText(QMLProfileEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
419 
420                                GridData data = new GridData();
421                                data.horizontalAlignment = GridData.FILL;
422                                containerLabel.setLayoutData(data);
423                        }
424 
425                        initialObjectField = new Combo(composite, SWT.BORDER);
426                        {
427                                GridData data = new GridData();
428                                data.horizontalAlignment = GridData.FILL;
429                                data.grabExcessHorizontalSpace = true;
430                                initialObjectField.setLayoutData(data);
431                        }
432 
433                        for (String objectName : getInitialObjectNames()) {
434                                initialObjectField.add(getLabel(objectName));
435                        }
436 
437                        if (initialObjectField.getItemCount() == 1) {
438                                initialObjectField.select(0);
439                        }
440                        initialObjectField.addModifyListener(validator);
441 
442                        Label encodingLabel = new Label(composite, SWT.LEFT);
443                        {
444                                encodingLabel.setText(QMLProfileEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
445 
446                                GridData data = new GridData();
447                                data.horizontalAlignment = GridData.FILL;
448                                encodingLabel.setLayoutData(data);
449                        }
450                        encodingField = new Combo(composite, SWT.BORDER);
451                        {
452                                GridData data = new GridData();
453                                data.horizontalAlignment = GridData.FILL;
454                                data.grabExcessHorizontalSpace = true;
455                                encodingField.setLayoutData(data);
456                        }
457 
458                        for (String encoding : getEncodings()) {
459                                encodingField.add(encoding);
460                        }
461 
462                        encodingField.select(0);
463                        encodingField.addModifyListener(validator);
464 
465                        setPageComplete(validatePage());
466                        setControl(composite);
467                }
468 
469                /**
470                 * <!-- begin-user-doc -->
471                 * <!-- end-user-doc -->
472                 * @generated
473                 */
474                protected ModifyListener validator =
475                        new ModifyListener() {
476                                public void modifyText(ModifyEvent e) {
477                                        setPageComplete(validatePage());
478                                }
479                        };
480 
481                /**
482                 * <!-- begin-user-doc -->
483                 * <!-- end-user-doc -->
484                 * @generated
485                 */
486                protected boolean validatePage() {
487                        return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
488                }
489 
490                /**
491                 * <!-- begin-user-doc -->
492                 * <!-- end-user-doc -->
493                 * @generated
494                 */
495                @Override
496                public void setVisible(boolean visible) {
497                        super.setVisible(visible);
498                        if (visible) {
499                                if (initialObjectField.getItemCount() == 1) {
500                                        initialObjectField.clearSelection();
501                                        encodingField.setFocus();
502                                }
503                                else {
504                                        encodingField.clearSelection();
505                                        initialObjectField.setFocus();
506                                }
507                        }
508                }
509 
510                /**
511                 * <!-- begin-user-doc -->
512                 * <!-- end-user-doc -->
513                 * @generated
514                 */
515                public String getInitialObjectName() {
516                        String label = initialObjectField.getText();
517 
518                        for (String name : getInitialObjectNames()) {
519                                if (getLabel(name).equals(label)) {
520                                        return name;
521                                }
522                        }
523                        return null;
524                }
525 
526                /**
527                 * <!-- begin-user-doc -->
528                 * <!-- end-user-doc -->
529                 * @generated
530                 */
531                public String getEncoding() {
532                        return encodingField.getText();
533                }
534 
535                /**
536                 * Returns the label for the specified type name.
537                 * <!-- begin-user-doc -->
538                 * <!-- end-user-doc -->
539                 * @generated
540                 */
541                protected String getLabel(String typeName) {
542                        try {
543                                return QMLProfileEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
544                        }
545                        catch(MissingResourceException mre) {
546                                QMLProfileEditorPlugin.INSTANCE.log(mre);
547                        }
548                        return typeName;
549                }
550 
551                /**
552                 * <!-- begin-user-doc -->
553                 * <!-- end-user-doc -->
554                 * @generated
555                 */
556                protected Collection<String> getEncodings() {
557                        if (encodings == null) {
558                                encodings = new ArrayList<String>();
559                                for (StringTokenizer stringTokenizer = new StringTokenizer(QMLProfileEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
560                                        encodings.add(stringTokenizer.nextToken());
561                                }
562                        }
563                        return encodings;
564                }
565        }
566 
567        /**
568         * The framework calls this to create the contents of the wizard.
569         * <!-- begin-user-doc -->
570         * <!-- end-user-doc -->
571         * @generated
572         */
573                @Override
574        public void addPages() {
575                // Create a page, set the title, and the initial model file name.
576                //
577                newFileCreationPage = new QMLProfileModelWizardNewFileCreationPage("Whatever", selection);
578                newFileCreationPage.setTitle(QMLProfileEditorPlugin.INSTANCE.getString("_UI_QMLProfileModelWizard_label"));
579                newFileCreationPage.setDescription(QMLProfileEditorPlugin.INSTANCE.getString("_UI_QMLProfileModelWizard_description"));
580                newFileCreationPage.setFileName(QMLProfileEditorPlugin.INSTANCE.getString("_UI_QMLProfileEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0));
581                addPage(newFileCreationPage);
582 
583                // Try and get the resource selection to determine a current directory for the file dialog.
584                //
585                if (selection != null && !selection.isEmpty()) {
586                        // Get the resource...
587                        //
588                        Object selectedElement = selection.iterator().next();
589                        if (selectedElement instanceof IResource) {
590                                // Get the resource parent, if its a file.
591                                //
592                                IResource selectedResource = (IResource)selectedElement;
593                                if (selectedResource.getType() == IResource.FILE) {
594                                        selectedResource = selectedResource.getParent();
595                                }
596 
597                                // This gives us a directory...
598                                //
599                                if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
600                                        // Set this for the container.
601                                        //
602                                        newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
603 
604                                        // Make up a unique new name here.
605                                        //
606                                        String defaultModelBaseFilename = QMLProfileEditorPlugin.INSTANCE.getString("_UI_QMLProfileEditorFilenameDefaultBase");
607                                        String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
608                                        String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
609                                        for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
610                                                modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
611                                        }
612                                        newFileCreationPage.setFileName(modelFilename);
613                                }
614                        }
615                }
616                initialObjectCreationPage = new QMLProfileModelWizardInitialObjectCreationPage("Whatever2");
617                initialObjectCreationPage.setTitle(QMLProfileEditorPlugin.INSTANCE.getString("_UI_QMLProfileModelWizard_label"));
618                initialObjectCreationPage.setDescription(QMLProfileEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
619                addPage(initialObjectCreationPage);
620        }
621 
622        /**
623         * Get the file from the page.
624         * <!-- begin-user-doc -->
625         * <!-- end-user-doc -->
626         * @generated
627         */
628        public IFile getModelFile() {
629                return newFileCreationPage.getModelFile();
630        }
631 
632}

[all classes][de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.presentation]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov