Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2013-01-16 10:46:32 +0000
committerEd Merks2013-01-16 10:46:32 +0000
commit4f68e28fcbb3f1a7266d7d4857a789e745427b21 (patch)
tree0a897193ff9b24ba0a1d34d3991c48afc993afa4
parent884d645931f6f0caacaf092c166ce19942f37176 (diff)
downloadorg.eclipse.emf-4f68e28fcbb3f1a7266d7d4857a789e745427b21.tar.gz
org.eclipse.emf-4f68e28fcbb3f1a7266d7d4857a789e745427b21.tar.xz
org.eclipse.emf-4f68e28fcbb3f1a7266d7d4857a789e745427b21.zip
[331055] Fix properties view pinning and regenerate.
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java100
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenAnnotationImpl.java2
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenEnumLiteralImpl.java2
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenFeatureImpl.java2
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java2
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenOperationImpl.java2
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenPackageImpl.java2
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenParameterImpl.java2
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java1453
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet65
-rw-r--r--plugins/org.eclipse.emf.ecore.editor/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java56
-rw-r--r--plugins/org.eclipse.emf.ecore.xcore.ui/src/org/eclipse/emf/ecore/xcore/ui/editor/XcoreEditor.java945
-rw-r--r--plugins/org.eclipse.emf.ecore/model/Ecore.genmodel2
13 files changed, 1354 insertions, 1281 deletions
diff --git a/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java b/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java
index e5c7a0199..05ada1d8d 100644
--- a/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java
+++ b/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java
@@ -43,6 +43,7 @@ import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -55,6 +56,7 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
@@ -101,8 +103,6 @@ import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EValidator;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -186,7 +186,7 @@ public class GenModelEditor
* <!-- end-user-doc -->
* @generated
*/
- protected PropertySheetPage propertySheetPage;
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
/**
* This is the viewer that shadows the selection in the content outline.
@@ -260,7 +260,7 @@ public class GenModelEditor
}
else if (p instanceof PropertySheet)
{
- if (((PropertySheet)p).getCurrentPage() == propertySheetPage)
+ if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage()))
{
getActionBarContributor().setActiveEditor(GenModelEditor.this);
handleActivate();
@@ -391,6 +391,18 @@ public class GenModelEditor
protected void unsetTarget(Resource target)
{
basicUnsetTarget(target);
+ resourceToDiagnosticMap.remove(target);
+ if (updateProblemIndication)
+ {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable()
+ {
+ public void run()
+ {
+ updateProblemIndication();
+ }
+ });
+ }
}
};
@@ -434,6 +446,7 @@ public class GenModelEditor
}
}
}
+ return false;
}
return true;
@@ -699,6 +712,8 @@ public class GenModelEditor
*/
protected void initializeEditingDomain()
{
+ // Create an adapter factory that yields item providers.
+ //
adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
// Create the command stack that will notify this editor as commands are executed.
@@ -726,10 +741,17 @@ public class GenModelEditor
{
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
-
- if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed())
+ for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); )
{
- propertySheetPage.refresh();
+ PropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed())
+ {
+ i.remove();
+ }
+ else
+ {
+ propertySheetPage.refresh();
+ }
}
}
});
@@ -952,7 +974,7 @@ public class GenModelEditor
getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
- Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() };
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
@@ -1284,27 +1306,25 @@ public class GenModelEditor
*/
public IPropertySheetPage getPropertySheetPage()
{
- if (propertySheetPage == null)
- {
- propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain)
+ PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain)
+ {
+ @Override
+ public void setSelectionToViewer(List<?> selection)
{
- @Override
- public void setSelectionToViewer(List<?> selection)
- {
- GenModelEditor.this.setSelectionToViewer(selection);
- GenModelEditor.this.setFocus();
- }
+ GenModelEditor.this.setSelectionToViewer(selection);
+ GenModelEditor.this.setFocus();
+ }
- @Override
- public void setActionBars(IActionBars actionBars)
- {
- super.setActionBars(actionBars);
- getActionBarContributor().shareGlobalActions(this, actionBars);
- }
- };
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- }
+ @Override
+ public void setActionBars(IActionBars actionBars)
+ {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -1365,6 +1385,7 @@ public class GenModelEditor
//
final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
// Do the work within an operation because this is a long running activity that modifies the workbench.
//
@@ -1426,7 +1447,7 @@ public class GenModelEditor
/**
* This returns whether something has been persisted to the URI of the specified resource.
- * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1508,25 +1529,10 @@ public class GenModelEditor
*/
public void gotoMarker(IMarker marker)
{
- try
+ List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ if (!targetObjects.isEmpty())
{
- if (marker.getType().equals(EValidator.MARKER))
- {
- String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
- if (uriAttribute != null)
- {
- URI uri = URI.createURI(uriAttribute);
- EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);
- if (eObject != null)
- {
- setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));
- }
- }
- }
- }
- catch (CoreException exception)
- {
- GenModelEditPlugin.INSTANCE.log(exception);
+ setSelectionToViewer(targetObjects);
}
}
@@ -1735,7 +1741,7 @@ public class GenModelEditor
getActionBarContributor().setActiveEditor(null);
}
- if (propertySheetPage != null)
+ for (PropertySheetPage propertySheetPage : propertySheetPages)
{
propertySheetPage.dispose();
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenAnnotationImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenAnnotationImpl.java
index c0a317c53..156b4da9d 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenAnnotationImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenAnnotationImpl.java
@@ -167,7 +167,7 @@ public class GenAnnotationImpl extends GenBaseImpl implements GenAnnotation
public GenBase getGenBase()
{
if (eContainerFeatureID() != GenModelPackage.GEN_ANNOTATION__GEN_BASE) return null;
- return (GenBase)eContainer();
+ return (GenBase)eInternalContainer();
}
/**
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenEnumLiteralImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenEnumLiteralImpl.java
index 4a56a46bc..8819adce0 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenEnumLiteralImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenEnumLiteralImpl.java
@@ -82,7 +82,7 @@ public class GenEnumLiteralImpl extends GenBaseImpl implements GenEnumLiteral
public GenEnum getGenEnum()
{
if (eContainerFeatureID() != GenModelPackage.GEN_ENUM_LITERAL__GEN_ENUM) return null;
- return (GenEnum)eContainer();
+ return (GenEnum)eInternalContainer();
}
/**
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenFeatureImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenFeatureImpl.java
index 2d48b0679..c63178ed2 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenFeatureImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenFeatureImpl.java
@@ -549,7 +549,7 @@ public class GenFeatureImpl extends GenTypedElementImpl implements GenFeature
public GenClass getGenClass()
{
if (eContainerFeatureID() != GenModelPackage.GEN_FEATURE__GEN_CLASS) return null;
- return (GenClass)eContainer();
+ return (GenClass)eInternalContainer();
}
/**
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java
index f859563be..47ca6384b 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java
@@ -40,7 +40,7 @@ public class GenModelFactoryImpl extends EFactoryImpl implements GenModelFactory
{
try
{
- GenModelFactory theGenModelFactory = (GenModelFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/2002/GenModel");
+ GenModelFactory theGenModelFactory = (GenModelFactory)EPackage.Registry.INSTANCE.getEFactory(GenModelPackage.eNS_URI);
if (theGenModelFactory != null)
{
return theGenModelFactory;
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenOperationImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenOperationImpl.java
index f33e682b9..c5c0b2b98 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenOperationImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenOperationImpl.java
@@ -122,7 +122,7 @@ public class GenOperationImpl extends GenTypedElementImpl implements GenOperatio
public GenClass getGenClass()
{
if (eContainerFeatureID() != GenModelPackage.GEN_OPERATION__GEN_CLASS) return null;
- return (GenClass)eContainer();
+ return (GenClass)eInternalContainer();
}
/**
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenPackageImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenPackageImpl.java
index f8c7dd2d2..f01ce2b23 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenPackageImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenPackageImpl.java
@@ -1273,7 +1273,7 @@ public class GenPackageImpl extends GenBaseImpl implements GenPackage
public GenModel getGenModelGen()
{
if (eContainerFeatureID() != GenModelPackage.GEN_PACKAGE__GEN_MODEL) return null;
- return (GenModel)eContainer();
+ return (GenModel)eInternalContainer();
}
/**
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenParameterImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenParameterImpl.java
index b38519a28..995bd6c75 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenParameterImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenParameterImpl.java
@@ -88,7 +88,7 @@ public class GenParameterImpl extends GenTypedElementImpl implements GenParamete
public GenOperation getGenOperation()
{
if (eContainerFeatureID() != GenModelPackage.GEN_PARAMETER__GEN_OPERATION) return null;
- return (GenOperation)eContainer();
+ return (GenOperation)eInternalContainer();
}
/**
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java
index 2cccaff32..d1c7a97f5 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java
@@ -85,394 +85,405 @@ public class Editor
protected final String TEXT_68 = NL + "\t\tfor (String extension : extensions)" + NL + "\t\t{" + NL + "\t\t\tresult.add(prefix + extension);";
protected final String TEXT_69 = NL + "\t\tfor (Iterator iterator = extensions.iterator() ; iterator.hasNext(); )" + NL + "\t\t{" + NL + "\t\t\tresult.add(prefix + (String)iterator.next());";
protected final String TEXT_70 = NL + "\t\t}" + NL + "\t\treturn Collections.unmodifiableList(result);" + NL + "\t}" + NL;
- protected final String TEXT_71 = NL + "\t/**" + NL + "\t * This keeps track of the editing domain that is used to track all changes to the model." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected AdapterFactoryEditingDomain editingDomain;" + NL + "" + NL + "\t/**" + NL + "\t * This is the one adapter factory used for providing views of the model." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ComposedAdapterFactory adapterFactory;" + NL + "" + NL + "\t/**" + NL + "\t * This is the content outline page." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IContentOutlinePage contentOutlinePage;" + NL + "" + NL + "\t/**" + NL + "\t * This is a kludge..." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IStatusLineManager contentOutlineStatusLineManager;" + NL + "" + NL + "\t/**" + NL + "\t * This is the content outline page's viewer." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer contentOutlineViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This is the property sheet page." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected PropertySheetPage propertySheetPage;" + NL + "" + NL + "\t/**" + NL + "\t * This is the viewer that shadows the selection in the content outline." + NL + "\t * The parent relation must be correctly defined for this to work." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer selectionViewer;";
- protected final String TEXT_72 = NL + NL + "\t/**" + NL + "\t * This inverts the roll of parent and child in the content provider and show parents as a tree." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer parentViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a tree view works." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer treeViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a list view works." + NL + "\t * A list viewer doesn't support icons." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ListViewer listViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a table view works." + NL + "\t * A table can be used as a list with icons." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TableViewer tableViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a tree view with columns works." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer treeViewerWithColumns;" + NL + "" + NL + "\t/**" + NL + "\t * This keeps track of the active viewer pane, in the book." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ViewerPane currentViewerPane;";
- protected final String TEXT_73 = NL + NL + "\t/**" + NL + "\t * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Viewer currentViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This listens to which ever viewer is active." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ISelectionChangedListener selectionChangedListener;" + NL + "" + NL + "\t/**" + NL + "\t * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_74 = " selectionChangedListeners = new ";
- protected final String TEXT_75 = "();" + NL + "" + NL + "\t/**" + NL + "\t * This keeps track of the selection of the editor as a whole." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ISelection editorSelection = StructuredSelection.EMPTY;" + NL;
- protected final String TEXT_76 = NL + "\t/**" + NL + "\t * The MarkerHelper is responsible for creating workspace resource markers presented" + NL + "\t * in Eclipse's Problems View." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected MarkerHelper markerHelper = new EditUIMarkerHelper();" + NL;
- protected final String TEXT_77 = NL + "\t/**" + NL + "\t * This listens for when the outline becomes active" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IPartListener partListener =" + NL + "\t\tnew IPartListener()" + NL + "\t\t{" + NL + "\t\t\tpublic void partActivated(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\tif (p instanceof ContentOutline)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tif (((ContentOutline)p).getCurrentPage() == contentOutlinePage)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetActionBarContributor().setActiveEditor(";
- protected final String TEXT_78 = ".this);" + NL + "" + NL + "\t\t\t\t\t\tsetCurrentViewer(contentOutlineViewer);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse if (p instanceof PropertySheet)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tif (((PropertySheet)p).getCurrentPage() == propertySheetPage)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetActionBarContributor().setActiveEditor(";
- protected final String TEXT_79 = ".this);" + NL + "\t\t\t\t\t\thandleActivate();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse if (p == ";
- protected final String TEXT_80 = ".this)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\thandleActivate();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tpublic void partBroughtToTop(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t\tpublic void partClosed(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t\tpublic void partDeactivated(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t\tpublic void partOpened(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t};" + NL + "" + NL + "\t/**" + NL + "\t * Resources that have been removed since last activation." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_81 = " removedResources = new ";
- protected final String TEXT_82 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Resources that have been changed since last activation." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_83 = " changedResources = new ";
- protected final String TEXT_84 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Resources that have been saved." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_85 = " savedResources = new ";
- protected final String TEXT_86 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Map to store the diagnostic associated with a resource." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_87 = " resourceToDiagnosticMap = new ";
- protected final String TEXT_88 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Controls whether the problem indication should be updated." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean updateProblemIndication = true;" + NL + "" + NL + "\t/**" + NL + "\t * Adapter used to update the problem indication when resources are demanded loaded." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EContentAdapter problemIndicationAdapter =" + NL + "\t\tnew EContentAdapter()" + NL + "\t\t{";
- protected final String TEXT_89 = NL + "\t\t\t@Override";
- protected final String TEXT_90 = NL + "\t\t\tpublic void notifyChanged(Notification notification)" + NL + "\t\t\t{" + NL + "\t\t\t\tif (notification.getNotifier() instanceof Resource)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tswitch (notification.getFeatureID(Resource.class))" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tcase Resource.RESOURCE__IS_LOADED:" + NL + "\t\t\t\t\t\tcase Resource.RESOURCE__ERRORS:" + NL + "\t\t\t\t\t\tcase Resource.RESOURCE__WARNINGS:" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tResource resource = (Resource)notification.getNotifier();" + NL + "\t\t\t\t\t\t\tDiagnostic diagnostic = analyzeResourceProblems(resource, null);" + NL + "\t\t\t\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, diagnostic);" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\telse" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.remove(resource);" + NL + "\t\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\t\tif (updateProblemIndication)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t\t updateProblemIndication();" + NL + "\t\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t\t });" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.notifyChanged(notification);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL;
+ protected final String TEXT_71 = NL + "\t/**" + NL + "\t * This keeps track of the editing domain that is used to track all changes to the model." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected AdapterFactoryEditingDomain editingDomain;" + NL + "" + NL + "\t/**" + NL + "\t * This is the one adapter factory used for providing views of the model." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ComposedAdapterFactory adapterFactory;" + NL + "" + NL + "\t/**" + NL + "\t * This is the content outline page." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IContentOutlinePage contentOutlinePage;" + NL + "" + NL + "\t/**" + NL + "\t * This is a kludge..." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IStatusLineManager contentOutlineStatusLineManager;" + NL + "" + NL + "\t/**" + NL + "\t * This is the content outline page's viewer." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer contentOutlineViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This is the property sheet page." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_72 = " propertySheetPages = new ";
+ protected final String TEXT_73 = "();" + NL + "" + NL + "\t/**" + NL + "\t * This is the viewer that shadows the selection in the content outline." + NL + "\t * The parent relation must be correctly defined for this to work." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer selectionViewer;";
+ protected final String TEXT_74 = NL + NL + "\t/**" + NL + "\t * This inverts the roll of parent and child in the content provider and show parents as a tree." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer parentViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a tree view works." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer treeViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a list view works." + NL + "\t * A list viewer doesn't support icons." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ListViewer listViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a table view works." + NL + "\t * A table can be used as a list with icons." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TableViewer tableViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This shows how a tree view with columns works." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected TreeViewer treeViewerWithColumns;" + NL + "" + NL + "\t/**" + NL + "\t * This keeps track of the active viewer pane, in the book." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ViewerPane currentViewerPane;";
+ protected final String TEXT_75 = NL + NL + "\t/**" + NL + "\t * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Viewer currentViewer;" + NL + "" + NL + "\t/**" + NL + "\t * This listens to which ever viewer is active." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ISelectionChangedListener selectionChangedListener;" + NL + "" + NL + "\t/**" + NL + "\t * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_76 = " selectionChangedListeners = new ";
+ protected final String TEXT_77 = "();" + NL + "" + NL + "\t/**" + NL + "\t * This keeps track of the selection of the editor as a whole." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ISelection editorSelection = StructuredSelection.EMPTY;" + NL;
+ protected final String TEXT_78 = NL + "\t/**" + NL + "\t * The MarkerHelper is responsible for creating workspace resource markers presented" + NL + "\t * in Eclipse's Problems View." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected MarkerHelper markerHelper = new EditUIMarkerHelper();" + NL;
+ protected final String TEXT_79 = NL + "\t/**" + NL + "\t * This listens for when the outline becomes active" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IPartListener partListener =" + NL + "\t\tnew IPartListener()" + NL + "\t\t{" + NL + "\t\t\tpublic void partActivated(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\tif (p instanceof ContentOutline)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tif (((ContentOutline)p).getCurrentPage() == contentOutlinePage)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetActionBarContributor().setActiveEditor(";
+ protected final String TEXT_80 = ".this);" + NL + "" + NL + "\t\t\t\t\t\tsetCurrentViewer(contentOutlineViewer);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse if (p instanceof PropertySheet)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tif (propertySheetPages.contains(((PropertySheet)p).getCurrentPage()))" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetActionBarContributor().setActiveEditor(";
+ protected final String TEXT_81 = ".this);" + NL + "\t\t\t\t\t\thandleActivate();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse if (p == ";
+ protected final String TEXT_82 = ".this)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\thandleActivate();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tpublic void partBroughtToTop(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t\tpublic void partClosed(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t\tpublic void partDeactivated(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t\tpublic void partOpened(IWorkbenchPart p)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Ignore." + NL + "\t\t\t}" + NL + "\t\t};" + NL + "" + NL + "\t/**" + NL + "\t * Resources that have been removed since last activation." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_83 = " removedResources = new ";
+ protected final String TEXT_84 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Resources that have been changed since last activation." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_85 = " changedResources = new ";
+ protected final String TEXT_86 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Resources that have been saved." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_87 = " savedResources = new ";
+ protected final String TEXT_88 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Map to store the diagnostic associated with a resource." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_89 = " resourceToDiagnosticMap = new ";
+ protected final String TEXT_90 = "();" + NL + "" + NL + "\t/**" + NL + "\t * Controls whether the problem indication should be updated." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean updateProblemIndication = true;" + NL + "" + NL + "\t/**" + NL + "\t * Adapter used to update the problem indication when resources are demanded loaded." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EContentAdapter problemIndicationAdapter =" + NL + "\t\tnew EContentAdapter()" + NL + "\t\t{";
protected final String TEXT_91 = NL + "\t\t\t@Override";
- protected final String TEXT_92 = NL + "\t\t\tprotected void setTarget(Resource target)" + NL + "\t\t\t{" + NL + "\t\t\t\tbasicSetTarget(target);" + NL + "\t\t\t}" + NL;
+ protected final String TEXT_92 = NL + "\t\t\tpublic void notifyChanged(Notification notification)" + NL + "\t\t\t{" + NL + "\t\t\t\tif (notification.getNotifier() instanceof Resource)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tswitch (notification.getFeatureID(Resource.class))" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tcase Resource.RESOURCE__IS_LOADED:" + NL + "\t\t\t\t\t\tcase Resource.RESOURCE__ERRORS:" + NL + "\t\t\t\t\t\tcase Resource.RESOURCE__WARNINGS:" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tResource resource = (Resource)notification.getNotifier();" + NL + "\t\t\t\t\t\t\tDiagnostic diagnostic = analyzeResourceProblems(resource, null);" + NL + "\t\t\t\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, diagnostic);" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\telse" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.remove(resource);" + NL + "\t\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\t\tif (updateProblemIndication)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t\t updateProblemIndication();" + NL + "\t\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t\t });" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.notifyChanged(notification);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL;
protected final String TEXT_93 = NL + "\t\t\t@Override";
- protected final String TEXT_94 = NL + "\t\t\tprotected void unsetTarget(Resource target)" + NL + "\t\t\t{" + NL + "\t\t\t\tbasicUnsetTarget(target);" + NL + "\t\t\t\tresourceToDiagnosticMap.remove(target);" + NL + "\t\t\t\tif (updateProblemIndication)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t updateProblemIndication();" + NL + "\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t });" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t};";
- protected final String TEXT_95 = NL + NL + "\t/**" + NL + "\t * This listens for workspace changes." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IResourceChangeListener resourceChangeListener =" + NL + "\t\tnew IResourceChangeListener()" + NL + "\t\t{" + NL + "\t\t\tpublic void resourceChanged(IResourceChangeEvent event)" + NL + "\t\t\t{" + NL + "\t\t\t\tIResourceDelta delta = event.getDelta();" + NL + "\t\t\t\ttry" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tclass ResourceDeltaVisitor implements IResourceDeltaVisitor" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tprotected ResourceSet resourceSet = editingDomain.getResourceSet();" + NL + "\t\t\t\t\t\tprotected ";
- protected final String TEXT_96 = " changedResources = new ";
- protected final String TEXT_97 = "();" + NL + "\t\t\t\t\t\tprotected ";
- protected final String TEXT_98 = " removedResources = new ";
- protected final String TEXT_99 = "();" + NL + "" + NL + "\t\t\t\t\t\tpublic boolean visit(";
- protected final String TEXT_100 = "final ";
- protected final String TEXT_101 = "IResourceDelta delta)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tif (delta.getResource().getType() == IResource.FILE)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tif (delta.getKind() == IResourceDelta.REMOVED ||" + NL + "\t\t\t\t\t\t\t\t delta.getKind() == IResourceDelta.CHANGED";
- protected final String TEXT_102 = " && delta.getFlags() != IResourceDelta.MARKERS";
- protected final String TEXT_103 = ")" + NL + "\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t";
- protected final String TEXT_104 = "final ";
- protected final String TEXT_105 = "Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);" + NL + "\t\t\t\t\t\t\t\t\tif (resource != null)" + NL + "\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\tif (delta.getKind() == IResourceDelta.REMOVED)" + NL + "\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\tremovedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t\t\t}";
- protected final String TEXT_106 = NL + "\t\t\t\t\t\t\t\t\t\telse if (!savedResources.remove(resource))" + NL + "\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\tchangedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t\t\t}";
- protected final String TEXT_107 = NL + "\t\t\t\t\t\t\t\t\t\telse" + NL + "\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\tif ((delta.getFlags() & IResourceDelta.MARKERS) != 0)" + NL + "\t\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t";
- protected final String TEXT_108 = ".DiagnosticAdapter.update(resource, markerHelper.getMarkerDiagnostics(resource, (IFile)delta.getResource()));" + NL + "\t\t\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t\t\t\tif ((delta.getFlags() & IResourceDelta.CONTENT) != 0)" + NL + "\t\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\t\tif (!savedResources.remove(resource))" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t\tchangedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t\t\t}";
- protected final String TEXT_109 = NL + "\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\tpublic ";
- protected final String TEXT_110 = " getChangedResources()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn changedResources;" + NL + "\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\tpublic ";
- protected final String TEXT_111 = " getRemovedResources()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn removedResources;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\tfinal ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();" + NL + "\t\t\t\t\tdelta.accept(visitor);" + NL + "" + NL + "\t\t\t\t\tif (!visitor.getRemovedResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t removedResources.addAll(visitor.getRemovedResources());" + NL + "\t\t\t\t\t\t\t\t\t if (!isDirty())" + NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t getSite().getPage().closeEditor(";
- protected final String TEXT_112 = ".this, false);" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t });" + NL + "\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\tif (!visitor.getChangedResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t changedResources.addAll(visitor.getChangedResources());" + NL + "\t\t\t\t\t\t\t\t\t if (getSite().getPage().getActiveEditor() == ";
- protected final String TEXT_113 = ".this)" + NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t handleActivate();" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t });" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\tcatch (CoreException exception)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
- protected final String TEXT_114 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t};";
- protected final String TEXT_115 = NL + NL + "\t/**" + NL + "\t * Handles activation of the editor or it's associated views." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleActivate()" + NL + "\t{" + NL + "\t\t// Recompute the read only state." + NL + "\t\t//" + NL + "\t\tif (editingDomain.getResourceToReadOnlyMap() != null)" + NL + "\t\t{" + NL + "\t\t editingDomain.getResourceToReadOnlyMap().clear();" + NL + "" + NL + "\t\t // Refresh any actions that may become enabled or disabled." + NL + "\t\t //" + NL + "\t\t setSelection(getSelection());" + NL + "\t\t}" + NL + "" + NL + "\t\tif (!removedResources.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tif (handleDirtyConflict())" + NL + "\t\t\t{" + NL + "\t\t\t\tgetSite().getPage().closeEditor(";
- protected final String TEXT_116 = ".this, false);" + NL + "\t\t\t}" + NL + "\t\t\telse" + NL + "\t\t\t{" + NL + "\t\t\t\tremovedResources.clear();" + NL + "\t\t\t\tchangedResources.clear();" + NL + "\t\t\t\tsavedResources.clear();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\telse if (!changedResources.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tchangedResources.removeAll(savedResources);" + NL + "\t\t\thandleChangedResources();" + NL + "\t\t\tchangedResources.clear();" + NL + "\t\t\tsavedResources.clear();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Handles what to do with changed resources on activation." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleChangedResources()" + NL + "\t{" + NL + "\t\tif (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict()))" + NL + "\t\t{" + NL + "\t\t\tif (isDirty())" + NL + "\t\t\t{" + NL + "\t\t\t\tchangedResources.addAll(editingDomain.getResourceSet().getResources());" + NL + "\t\t\t}" + NL + "\t\t\teditingDomain.getCommandStack().flush();" + NL + "" + NL + "\t\t\tupdateProblemIndication = false;";
- protected final String TEXT_117 = NL + "\t\t\tfor (Resource resource : changedResources)";
- protected final String TEXT_118 = NL + "\t\t\tfor (Iterator i = changedResources.iterator(); i.hasNext(); )";
- protected final String TEXT_119 = NL + "\t\t\t{";
- protected final String TEXT_120 = NL + "\t\t\t\tResource resource = (Resource)i.next();";
- protected final String TEXT_121 = NL + "\t\t\t\tif (resource.isLoaded())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tresource.unload();" + NL + "\t\t\t\t\ttry" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tresource.load(Collections.EMPTY_MAP);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tcatch (IOException exception)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tif (!resourceToDiagnosticMap.containsKey(resource))" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL;
- protected final String TEXT_122 = NL + "\t\t\tif (AdapterFactoryEditingDomain.isStale(editorSelection))" + NL + "\t\t\t{" + NL + "\t\t\t\tsetSelection(StructuredSelection.EMPTY);" + NL + "\t\t\t}";
- protected final String TEXT_123 = NL + NL + "\t\t\tupdateProblemIndication = true;" + NL + "\t\t\tupdateProblemIndication();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Updates the problems indication with the information described in the specified diagnostic." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void updateProblemIndication()" + NL + "\t{" + NL + "\t\tif (updateProblemIndication)" + NL + "\t\t{" + NL + "\t\t\tBasicDiagnostic diagnostic =" + NL + "\t\t\t\tnew BasicDiagnostic" + NL + "\t\t\t\t\t(Diagnostic.OK," + NL + "\t\t\t\t\t \"";
- protected final String TEXT_124 = "\",";
- protected final String TEXT_125 = NL + "\t\t\t\t\t 0," + NL + "\t\t\t\t\t null," + NL + "\t\t\t\t\t new Object [] { editingDomain.getResourceSet() });";
- protected final String TEXT_126 = NL + "\t\t\tfor (Diagnostic childDiagnostic : resourceToDiagnosticMap.values())";
- protected final String TEXT_127 = NL + "\t\t\tfor (Iterator i = resourceToDiagnosticMap.values().iterator(); i.hasNext(); )";
- protected final String TEXT_128 = NL + "\t\t\t{";
- protected final String TEXT_129 = NL + "\t\t\t\tDiagnostic childDiagnostic = (Diagnostic)i.next();";
- protected final String TEXT_130 = NL + "\t\t\t\tif (childDiagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tdiagnostic.add(childDiagnostic);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tint lastEditorPage = getPageCount() - 1;" + NL + "\t\t\tif (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart)" + NL + "\t\t\t{" + NL + "\t\t\t\t((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);" + NL + "\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsetActivePage(lastEditorPage);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\telse if (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t{" + NL + "\t\t\t\tProblemEditorPart problemEditorPart = new ProblemEditorPart();" + NL + "\t\t\t\tproblemEditorPart.setDiagnostic(diagnostic);";
- protected final String TEXT_131 = NL + "\t\t\t\tproblemEditorPart.setMarkerHelper(markerHelper);";
- protected final String TEXT_132 = NL + "\t\t\t\ttry" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\taddPage(++lastEditorPage, problemEditorPart, getEditorInput());" + NL + "\t\t\t\t\tsetPageText(lastEditorPage, problemEditorPart.getPartName());" + NL + "\t\t\t\t\tsetActivePage(lastEditorPage);" + NL + "\t\t\t\t\tshowTabs();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tcatch (PartInitException exception)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
- protected final String TEXT_133 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t}" + NL + "\t\t\t}";
- protected final String TEXT_134 = NL + NL + "\t\t\tif (markerHelper.hasMarkers(editingDomain.getResourceSet()))" + NL + "\t\t\t{" + NL + "\t\t\t\tmarkerHelper.deleteMarkers(editingDomain.getResourceSet());" + NL + "\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\ttry" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tmarkerHelper.createMarkers(diagnostic);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tcatch (CoreException exception)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t";
- protected final String TEXT_135 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}";
- protected final String TEXT_136 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Shows a dialog that asks if conflicting changes should be discarded." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean handleDirtyConflict()" + NL + "\t{" + NL + "\t\treturn" + NL + "\t\t\tMessageDialog.openQuestion" + NL + "\t\t\t\t(getSite().getShell()," + NL + "\t\t\t\t getString(\"_UI_FileConflict_label\"),";
- protected final String TEXT_137 = NL + "\t\t\t\t getString(\"_WARN_FileConflict\"));";
- protected final String TEXT_138 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This creates a model editor." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_139 = "()" + NL + "\t{" + NL + "\t\tsuper();" + NL + "\t\tinitializeEditingDomain();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This sets up the editing domain for the model editor." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void initializeEditingDomain()" + NL + "\t{" + NL + "\t\t// Create an adapter factory that yields item providers." + NL + "\t\t//" + NL + "\t\tadapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);" + NL + "" + NL + "\t\tadapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());";
- protected final String TEXT_140 = NL + "\t\tadapterFactory.addAdapterFactory(new ";
- protected final String TEXT_141 = "());";
+ protected final String TEXT_94 = NL + "\t\t\tprotected void setTarget(Resource target)" + NL + "\t\t\t{" + NL + "\t\t\t\tbasicSetTarget(target);" + NL + "\t\t\t}" + NL;
+ protected final String TEXT_95 = NL + "\t\t\t@Override";
+ protected final String TEXT_96 = NL + "\t\t\tprotected void unsetTarget(Resource target)" + NL + "\t\t\t{" + NL + "\t\t\t\tbasicUnsetTarget(target);" + NL + "\t\t\t\tresourceToDiagnosticMap.remove(target);" + NL + "\t\t\t\tif (updateProblemIndication)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t updateProblemIndication();" + NL + "\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t });" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t};";
+ protected final String TEXT_97 = NL + NL + "\t/**" + NL + "\t * This listens for workspace changes." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IResourceChangeListener resourceChangeListener =" + NL + "\t\tnew IResourceChangeListener()" + NL + "\t\t{" + NL + "\t\t\tpublic void resourceChanged(IResourceChangeEvent event)" + NL + "\t\t\t{" + NL + "\t\t\t\tIResourceDelta delta = event.getDelta();" + NL + "\t\t\t\ttry" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tclass ResourceDeltaVisitor implements IResourceDeltaVisitor" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tprotected ResourceSet resourceSet = editingDomain.getResourceSet();" + NL + "\t\t\t\t\t\tprotected ";
+ protected final String TEXT_98 = " changedResources = new ";
+ protected final String TEXT_99 = "();" + NL + "\t\t\t\t\t\tprotected ";
+ protected final String TEXT_100 = " removedResources = new ";
+ protected final String TEXT_101 = "();" + NL + "" + NL + "\t\t\t\t\t\tpublic boolean visit(";
+ protected final String TEXT_102 = "final ";
+ protected final String TEXT_103 = "IResourceDelta delta)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tif (delta.getResource().getType() == IResource.FILE)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tif (delta.getKind() == IResourceDelta.REMOVED ||" + NL + "\t\t\t\t\t\t\t\t delta.getKind() == IResourceDelta.CHANGED";
+ protected final String TEXT_104 = " && delta.getFlags() != IResourceDelta.MARKERS";
+ protected final String TEXT_105 = ")" + NL + "\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t";
+ protected final String TEXT_106 = "final ";
+ protected final String TEXT_107 = "Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);" + NL + "\t\t\t\t\t\t\t\t\tif (resource != null)" + NL + "\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\tif (delta.getKind() == IResourceDelta.REMOVED)" + NL + "\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\tremovedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t\t\t}";
+ protected final String TEXT_108 = NL + "\t\t\t\t\t\t\t\t\t\telse if (!savedResources.remove(resource))" + NL + "\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\tchangedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t\t\t}";
+ protected final String TEXT_109 = NL + "\t\t\t\t\t\t\t\t\t\telse" + NL + "\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\tif ((delta.getFlags() & IResourceDelta.MARKERS) != 0)" + NL + "\t\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t";
+ protected final String TEXT_110 = ".DiagnosticAdapter.update(resource, markerHelper.getMarkerDiagnostics(resource, (IFile)delta.getResource()));" + NL + "\t\t\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t\t\t\tif ((delta.getFlags() & IResourceDelta.CONTENT) != 0)" + NL + "\t\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\t\tif (!savedResources.remove(resource))" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t\tchangedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t\t\t}";
+ protected final String TEXT_111 = NL + "\t\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\tpublic ";
+ protected final String TEXT_112 = " getChangedResources()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn changedResources;" + NL + "\t\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t\tpublic ";
+ protected final String TEXT_113 = " getRemovedResources()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn removedResources;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\tfinal ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();" + NL + "\t\t\t\t\tdelta.accept(visitor);" + NL + "" + NL + "\t\t\t\t\tif (!visitor.getRemovedResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t removedResources.addAll(visitor.getRemovedResources());" + NL + "\t\t\t\t\t\t\t\t\t if (!isDirty())" + NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t getSite().getPage().closeEditor(";
+ protected final String TEXT_114 = ".this, false);" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t });" + NL + "\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\tif (!visitor.getChangedResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t\t(new Runnable()" + NL + "\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t changedResources.addAll(visitor.getChangedResources());" + NL + "\t\t\t\t\t\t\t\t\t if (getSite().getPage().getActiveEditor() == ";
+ protected final String TEXT_115 = ".this)" + NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t handleActivate();" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t });" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\tcatch (CoreException exception)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
+ protected final String TEXT_116 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t};";
+ protected final String TEXT_117 = NL + NL + "\t/**" + NL + "\t * Handles activation of the editor or it's associated views." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleActivate()" + NL + "\t{" + NL + "\t\t// Recompute the read only state." + NL + "\t\t//" + NL + "\t\tif (editingDomain.getResourceToReadOnlyMap() != null)" + NL + "\t\t{" + NL + "\t\t editingDomain.getResourceToReadOnlyMap().clear();" + NL + "" + NL + "\t\t // Refresh any actions that may become enabled or disabled." + NL + "\t\t //" + NL + "\t\t setSelection(getSelection());" + NL + "\t\t}" + NL + "" + NL + "\t\tif (!removedResources.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tif (handleDirtyConflict())" + NL + "\t\t\t{" + NL + "\t\t\t\tgetSite().getPage().closeEditor(";
+ protected final String TEXT_118 = ".this, false);" + NL + "\t\t\t}" + NL + "\t\t\telse" + NL + "\t\t\t{" + NL + "\t\t\t\tremovedResources.clear();" + NL + "\t\t\t\tchangedResources.clear();" + NL + "\t\t\t\tsavedResources.clear();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\telse if (!changedResources.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tchangedResources.removeAll(savedResources);" + NL + "\t\t\thandleChangedResources();" + NL + "\t\t\tchangedResources.clear();" + NL + "\t\t\tsavedResources.clear();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Handles what to do with changed resources on activation." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleChangedResources()" + NL + "\t{" + NL + "\t\tif (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict()))" + NL + "\t\t{" + NL + "\t\t\tif (isDirty())" + NL + "\t\t\t{" + NL + "\t\t\t\tchangedResources.addAll(editingDomain.getResourceSet().getResources());" + NL + "\t\t\t}" + NL + "\t\t\teditingDomain.getCommandStack().flush();" + NL + "" + NL + "\t\t\tupdateProblemIndication = false;";
+ protected final String TEXT_119 = NL + "\t\t\tfor (Resource resource : changedResources)";
+ protected final String TEXT_120 = NL + "\t\t\tfor (Iterator i = changedResources.iterator(); i.hasNext(); )";
+ protected final String TEXT_121 = NL + "\t\t\t{";
+ protected final String TEXT_122 = NL + "\t\t\t\tResource resource = (Resource)i.next();";
+ protected final String TEXT_123 = NL + "\t\t\t\tif (resource.isLoaded())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tresource.unload();" + NL + "\t\t\t\t\ttry" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tresource.load(Collections.EMPTY_MAP);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tcatch (IOException exception)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tif (!resourceToDiagnosticMap.containsKey(resource))" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL;
+ protected final String TEXT_124 = NL + "\t\t\tif (AdapterFactoryEditingDomain.isStale(editorSelection))" + NL + "\t\t\t{" + NL + "\t\t\t\tsetSelection(StructuredSelection.EMPTY);" + NL + "\t\t\t}";
+ protected final String TEXT_125 = NL + NL + "\t\t\tupdateProblemIndication = true;" + NL + "\t\t\tupdateProblemIndication();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Updates the problems indication with the information described in the specified diagnostic." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void updateProblemIndication()" + NL + "\t{" + NL + "\t\tif (updateProblemIndication)" + NL + "\t\t{" + NL + "\t\t\tBasicDiagnostic diagnostic =" + NL + "\t\t\t\tnew BasicDiagnostic" + NL + "\t\t\t\t\t(Diagnostic.OK," + NL + "\t\t\t\t\t \"";
+ protected final String TEXT_126 = "\",";
+ protected final String TEXT_127 = NL + "\t\t\t\t\t 0," + NL + "\t\t\t\t\t null," + NL + "\t\t\t\t\t new Object [] { editingDomain.getResourceSet() });";
+ protected final String TEXT_128 = NL + "\t\t\tfor (Diagnostic childDiagnostic : resourceToDiagnosticMap.values())";
+ protected final String TEXT_129 = NL + "\t\t\tfor (Iterator i = resourceToDiagnosticMap.values().iterator(); i.hasNext(); )";
+ protected final String TEXT_130 = NL + "\t\t\t{";
+ protected final String TEXT_131 = NL + "\t\t\t\tDiagnostic childDiagnostic = (Diagnostic)i.next();";
+ protected final String TEXT_132 = NL + "\t\t\t\tif (childDiagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tdiagnostic.add(childDiagnostic);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tint lastEditorPage = getPageCount() - 1;" + NL + "\t\t\tif (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart)" + NL + "\t\t\t{" + NL + "\t\t\t\t((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);" + NL + "\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsetActivePage(lastEditorPage);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\telse if (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t{" + NL + "\t\t\t\tProblemEditorPart problemEditorPart = new ProblemEditorPart();" + NL + "\t\t\t\tproblemEditorPart.setDiagnostic(diagnostic);";
+ protected final String TEXT_133 = NL + "\t\t\t\tproblemEditorPart.setMarkerHelper(markerHelper);";
+ protected final String TEXT_134 = NL + "\t\t\t\ttry" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\taddPage(++lastEditorPage, problemEditorPart, getEditorInput());" + NL + "\t\t\t\t\tsetPageText(lastEditorPage, problemEditorPart.getPartName());" + NL + "\t\t\t\t\tsetActivePage(lastEditorPage);" + NL + "\t\t\t\t\tshowTabs();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tcatch (PartInitException exception)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
+ protected final String TEXT_135 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t}" + NL + "\t\t\t}";
+ protected final String TEXT_136 = NL + NL + "\t\t\tif (markerHelper.hasMarkers(editingDomain.getResourceSet()))" + NL + "\t\t\t{" + NL + "\t\t\t\tmarkerHelper.deleteMarkers(editingDomain.getResourceSet());" + NL + "\t\t\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\ttry" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tmarkerHelper.createMarkers(diagnostic);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tcatch (CoreException exception)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t";
+ protected final String TEXT_137 = ".INSTANCE.log(exception);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}";
+ protected final String TEXT_138 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Shows a dialog that asks if conflicting changes should be discarded." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean handleDirtyConflict()" + NL + "\t{" + NL + "\t\treturn" + NL + "\t\t\tMessageDialog.openQuestion" + NL + "\t\t\t\t(getSite().getShell()," + NL + "\t\t\t\t getString(\"_UI_FileConflict_label\"),";
+ protected final String TEXT_139 = NL + "\t\t\t\t getString(\"_WARN_FileConflict\"));";
+ protected final String TEXT_140 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This creates a model editor." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_141 = "()" + NL + "\t{" + NL + "\t\tsuper();" + NL + "\t\tinitializeEditingDomain();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This sets up the editing domain for the model editor." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void initializeEditingDomain()" + NL + "\t{" + NL + "\t\t// Create an adapter factory that yields item providers." + NL + "\t\t//" + NL + "\t\tadapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);" + NL + "" + NL + "\t\tadapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());";
protected final String TEXT_142 = NL + "\t\tadapterFactory.addAdapterFactory(new ";
protected final String TEXT_143 = "());";
- protected final String TEXT_144 = NL + "\t\tadapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());" + NL + "" + NL + "\t\t// Create the command stack that will notify this editor as commands are executed." + NL + "\t\t//" + NL + "\t\tBasicCommandStack commandStack = new BasicCommandStack();" + NL + "" + NL + "\t\t// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus." + NL + "\t\t//" + NL + "\t\tcommandStack.addCommandStackListener" + NL + "\t\t\t(new CommandStackListener()" + NL + "\t\t\t {" + NL + "\t\t\t\t public void commandStackChanged(final EventObject event)" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t getContainer().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t (new Runnable()" + NL + "\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t firePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "" + NL + "\t\t\t\t\t\t\t\t // Try to select the affected objects." + NL + "\t\t\t\t\t\t\t\t //" + NL + "\t\t\t\t\t\t\t\t Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();" + NL + "\t\t\t\t\t\t\t\t if (mostRecentCommand != null)" + NL + "\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t setSelectionToViewer(mostRecentCommand.getAffectedObjects());" + NL + "\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed())" + NL + "\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t propertySheetPage.refresh();" + NL + "\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t });" + NL + "\t\t\t\t }" + NL + "\t\t\t });" + NL + "" + NL + "\t\t// Create the editing domain with a special command stack." + NL + "\t\t//" + NL + "\t\teditingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new ";
- protected final String TEXT_145 = "());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is here for the listener to be able to call it." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_146 = NL + "\t\t\t@Override";
- protected final String TEXT_147 = NL + "\tprotected void firePropertyChange(int action)" + NL + "\t{" + NL + "\t\tsuper.firePropertyChange(action);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This sets the selection into whichever viewer is active." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setSelectionToViewer(";
- protected final String TEXT_148 = " collection)" + NL + "\t{" + NL + "\t\tfinal ";
- protected final String TEXT_149 = " theSelection = collection;" + NL + "\t\t// Make sure it's okay." + NL + "\t\t//" + NL + "\t\tif (theSelection != null && !theSelection.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tRunnable runnable =" + NL + "\t\t\t\tnew Runnable()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tpublic void run()" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t// Try to select the items in the current content viewer of the editor." + NL + "\t\t\t\t\t\t//" + NL + "\t\t\t\t\t\tif (currentViewer != null)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tcurrentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\tgetSite().getShell().getDisplay().asyncExec(runnable);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This returns the editing domain as required by the {@link IEditingDomainProvider} interface." + NL + "\t * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}" + NL + "\t * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditingDomain getEditingDomain()" + NL + "\t{" + NL + "\t\treturn editingDomain;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider" + NL + "\t{" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory)" + NL + "\t\t{" + NL + "\t\t\tsuper(adapterFactory);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
- protected final String TEXT_150 = NL + "\t\t@Override";
- protected final String TEXT_151 = NL + "\t\tpublic Object [] getElements(Object object)" + NL + "\t\t{" + NL + "\t\t\tObject parent = super.getParent(object);" + NL + "\t\t\treturn (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
- protected final String TEXT_152 = NL + "\t\t@Override";
- protected final String TEXT_153 = NL + "\t\tpublic Object [] getChildren(Object object)" + NL + "\t\t{" + NL + "\t\t\tObject parent = super.getParent(object);" + NL + "\t\t\treturn (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
- protected final String TEXT_154 = NL + "\t\t@Override";
- protected final String TEXT_155 = NL + "\t\tpublic boolean hasChildren(Object object)" + NL + "\t\t{" + NL + "\t\t\tObject parent = super.getParent(object);" + NL + "\t\t\treturn parent != null;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
+ protected final String TEXT_144 = NL + "\t\tadapterFactory.addAdapterFactory(new ";
+ protected final String TEXT_145 = "());";
+ protected final String TEXT_146 = NL + "\t\tadapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());" + NL + "" + NL + "\t\t// Create the command stack that will notify this editor as commands are executed." + NL + "\t\t//" + NL + "\t\tBasicCommandStack commandStack = new BasicCommandStack();" + NL + "" + NL + "\t\t// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus." + NL + "\t\t//" + NL + "\t\tcommandStack.addCommandStackListener" + NL + "\t\t\t(new CommandStackListener()" + NL + "\t\t\t {" + NL + "\t\t\t\t public void commandStackChanged(final EventObject event)" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t getContainer().getDisplay().asyncExec" + NL + "\t\t\t\t\t\t (new Runnable()" + NL + "\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t firePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "" + NL + "\t\t\t\t\t\t\t\t // Try to select the affected objects." + NL + "\t\t\t\t\t\t\t\t //" + NL + "\t\t\t\t\t\t\t\t Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();" + NL + "\t\t\t\t\t\t\t\t if (mostRecentCommand != null)" + NL + "\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t setSelectionToViewer(mostRecentCommand.getAffectedObjects());" + NL + "\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t for (Iterator";
+ protected final String TEXT_147 = "<PropertySheetPage>";
+ protected final String TEXT_148 = " i = propertySheetPages.iterator(); i.hasNext(); )" + NL + "\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t PropertySheetPage propertySheetPage = ";
+ protected final String TEXT_149 = "(PropertySheetPage)";
+ protected final String TEXT_150 = "i.next();" + NL + "\t\t\t\t\t\t\t\t\t if (propertySheetPage.getControl().isDisposed())" + NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t i.remove();" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t\t else" + NL + "\t\t\t\t\t\t\t\t\t {" + NL + "\t\t\t\t\t\t\t\t\t\t propertySheetPage.refresh();" + NL + "\t\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t\t }" + NL + "\t\t\t\t\t\t });" + NL + "\t\t\t\t }" + NL + "\t\t\t });" + NL + "" + NL + "\t\t// Create the editing domain with a special command stack." + NL + "\t\t//" + NL + "\t\teditingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new ";
+ protected final String TEXT_151 = "());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is here for the listener to be able to call it." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_152 = NL + "\t\t\t@Override";
+ protected final String TEXT_153 = NL + "\tprotected void firePropertyChange(int action)" + NL + "\t{" + NL + "\t\tsuper.firePropertyChange(action);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This sets the selection into whichever viewer is active." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setSelectionToViewer(";
+ protected final String TEXT_154 = " collection)" + NL + "\t{" + NL + "\t\tfinal ";
+ protected final String TEXT_155 = " theSelection = collection;" + NL + "\t\t// Make sure it's okay." + NL + "\t\t//" + NL + "\t\tif (theSelection != null && !theSelection.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tRunnable runnable =" + NL + "\t\t\t\tnew Runnable()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tpublic void run()" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t// Try to select the items in the current content viewer of the editor." + NL + "\t\t\t\t\t\t//" + NL + "\t\t\t\t\t\tif (currentViewer != null)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tcurrentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\tgetSite().getShell().getDisplay().asyncExec(runnable);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This returns the editing domain as required by the {@link IEditingDomainProvider} interface." + NL + "\t * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}" + NL + "\t * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditingDomain getEditingDomain()" + NL + "\t{" + NL + "\t\treturn editingDomain;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider" + NL + "\t{" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory)" + NL + "\t\t{" + NL + "\t\t\tsuper(adapterFactory);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
protected final String TEXT_156 = NL + "\t\t@Override";
- protected final String TEXT_157 = NL + "\t\tpublic Object getParent(Object object)" + NL + "\t\t{" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t}";
- protected final String TEXT_158 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setCurrentViewerPane(ViewerPane viewerPane)" + NL + "\t{" + NL + "\t\tif (currentViewerPane != viewerPane)" + NL + "\t\t{" + NL + "\t\t\tif (currentViewerPane != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tcurrentViewerPane.showFocus(false);" + NL + "\t\t\t}" + NL + "\t\t\tcurrentViewerPane = viewerPane;" + NL + "\t\t}" + NL + "\t\tsetCurrentViewer(currentViewerPane.getViewer());" + NL + "\t}";
- protected final String TEXT_159 = NL + NL + "\t/**" + NL + "\t * This makes sure that one content viewer, either for the current page or the outline view, if it has focus," + NL + "\t * is the current one." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setCurrentViewer(Viewer viewer)" + NL + "\t{" + NL + "\t\t// If it is changing..." + NL + "\t\t//" + NL + "\t\tif (currentViewer != viewer)" + NL + "\t\t{" + NL + "\t\t\tif (selectionChangedListener == null)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Create the listener on demand." + NL + "\t\t\t\t//" + NL + "\t\t\t\tselectionChangedListener =" + NL + "\t\t\t\t\tnew ISelectionChangedListener()" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t// This just notifies those things that are affected by the section." + NL + "\t\t\t\t\t\t//" + NL + "\t\t\t\t\t\tpublic void selectionChanged(SelectionChangedEvent selectionChangedEvent)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsetSelection(selectionChangedEvent.getSelection());" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Stop listening to the old one." + NL + "\t\t\t//" + NL + "\t\t\tif (currentViewer != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tcurrentViewer.removeSelectionChangedListener(selectionChangedListener);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Start listening to the new one." + NL + "\t\t\t//" + NL + "\t\t\tif (viewer != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tviewer.addSelectionChangedListener(selectionChangedListener);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Remember it." + NL + "\t\t\t//" + NL + "\t\t\tcurrentViewer = viewer;" + NL + "" + NL + "\t\t\t// Set the editors selection based on the current viewer's selection." + NL + "\t\t\t//" + NL + "\t\t\tsetSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This returns the viewer as required by the {@link IViewerProvider} interface." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Viewer getViewer()" + NL + "\t{" + NL + "\t\treturn currentViewer;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This creates a context menu for the viewer and adds a listener as well registering the menu for extension." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createContextMenuFor(StructuredViewer viewer)" + NL + "\t{" + NL + "\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\");";
- protected final String TEXT_160 = NL + "\t\tcontextMenu.add(new Separator(\"additions\"));";
- protected final String TEXT_161 = NL + "\t\tcontextMenu.setRemoveAllWhenShown(true);" + NL + "\t\tcontextMenu.addMenuListener(this);" + NL + "\t\tMenu menu= contextMenu.createContextMenu(viewer.getControl());" + NL + "\t\tviewer.getControl().setMenu(menu);";
- protected final String TEXT_162 = NL + "\t\tgetSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));";
- protected final String TEXT_163 = NL + "\t\tgetSite().registerContextMenu(contextMenu, viewer);";
- protected final String TEXT_164 = NL + NL + "\t\tint dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;" + NL + "\t\tTransfer[] transfers = new Transfer[] { LocalTransfer.getInstance()";
- protected final String TEXT_165 = ", LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance()";
- protected final String TEXT_166 = " };" + NL + "\t\tviewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));" + NL + "\t\tviewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is the method called to load a resource into the editing domain's resource set based on the editor's input." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void createModel()" + NL + "\t{";
- protected final String TEXT_167 = NL + "\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());";
- protected final String TEXT_168 = NL + "\t\tURI resourceURI = URI.createURI(getEditorInput().getName());";
- protected final String TEXT_169 = NL + "\t\t// Assumes that the input is a file object." + NL + "\t\t//" + NL + "\t\tIFileEditorInput modelFile = (IFileEditorInput)getEditorInput();" + NL + "\t\tURI resourceURI = URI.createPlatformResourceURI(modelFile.getFile().getFullPath().toString(), true);";
- protected final String TEXT_170 = NL + "\t\tException exception = null;" + NL + "\t\tResource resource = null;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\t// Load the resource through the editing domain." + NL + "\t\t\t//" + NL + "\t\t\tresource = editingDomain.getResourceSet().getResource(resourceURI, true);" + NL + "\t\t}" + NL + "\t\tcatch (Exception e)" + NL + "\t\t{" + NL + "\t\t\texception = e;" + NL + "\t\t\tresource = editingDomain.getResourceSet().getResource(resourceURI, false);" + NL + "\t\t}" + NL + "" + NL + "\t\tDiagnostic diagnostic = analyzeResourceProblems(resource, exception);" + NL + "\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t{" + NL + "\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t}" + NL + "\t\teditingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns a diagnostic describing the errors and warnings listed in the resource" + NL + "\t * and the specified exception (if any)." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Diagnostic analyzeResourceProblems(Resource resource, Exception exception)" + NL + "\t{" + NL + "\t\tif (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty())" + NL + "\t\t{" + NL + "\t\t\tBasicDiagnostic basicDiagnostic =" + NL + "\t\t\t\tnew BasicDiagnostic" + NL + "\t\t\t\t\t(Diagnostic.ERROR," + NL + "\t\t\t\t\t \"";
- protected final String TEXT_171 = "\",";
- protected final String TEXT_172 = NL + "\t\t\t\t\t 0," + NL + "\t\t\t\t\t getString(\"_UI_CreateModelError_message\", resource.getURI()),";
- protected final String TEXT_173 = NL + "\t\t\t\t\t new Object [] { exception == null ? (Object)resource : exception });" + NL + "\t\t\tbasicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));" + NL + "\t\t\treturn basicDiagnostic;" + NL + "\t\t}" + NL + "\t\telse if (exception != null)" + NL + "\t\t{" + NL + "\t\t\treturn" + NL + "\t\t\t\tnew BasicDiagnostic" + NL + "\t\t\t\t\t(Diagnostic.ERROR," + NL + "\t\t\t\t\t \"";
- protected final String TEXT_174 = "\",";
- protected final String TEXT_175 = NL + "\t\t\t\t\t 0," + NL + "\t\t\t\t\t getString(\"_UI_CreateModelError_message\", resource.getURI()),";
- protected final String TEXT_176 = NL + "\t\t\t\t\t new Object[] { exception });" + NL + "\t\t}" + NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\treturn Diagnostic.OK_INSTANCE;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is the method used by the framework to install your own controls." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_177 = NL + "\t@Override";
- protected final String TEXT_178 = NL + "\tpublic void createPages()" + NL + "\t{" + NL + "\t\t// Creates the model from the editor input" + NL + "\t\t//" + NL + "\t\tcreateModel();" + NL + "" + NL + "\t\t// Only creates the other pages if there is something that can be edited" + NL + "\t\t//" + NL + "\t\tif (!getEditingDomain().getResourceSet().getResources().isEmpty())" + NL + "\t\t{" + NL + "\t\t\t// Create a page for the selection tree view." + NL + "\t\t\t//";
- protected final String TEXT_179 = NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
- protected final String TEXT_180 = ".this)" + NL + "\t\t\t\t\t{";
- protected final String TEXT_181 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_182 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tTree tree = new Tree(composite, SWT.MULTI);" + NL + "\t\t\t\t\t\t\tTreeViewer newTreeViewer = new TreeViewer(tree);" + NL + "\t\t\t\t\t\t\treturn newTreeViewer;" + NL + "\t\t\t\t\t\t}";
- protected final String TEXT_183 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_184 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL + "\t\t\t\tselectionViewer = (TreeViewer)viewerPane.getViewer();" + NL + "\t\t\t\tselectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "" + NL + "\t\t\t\tselectionViewer.setLabelProvider(";
- protected final String TEXT_185 = "new ";
- protected final String TEXT_186 = "(";
- protected final String TEXT_187 = "new ";
- protected final String TEXT_188 = "(adapterFactory";
- protected final String TEXT_189 = ", selectionViewer";
- protected final String TEXT_190 = ")";
- protected final String TEXT_191 = ", new ";
- protected final String TEXT_192 = "(editingDomain";
- protected final String TEXT_193 = ".getResourceSet()";
- protected final String TEXT_194 = ", selectionViewer";
- protected final String TEXT_195 = ", ";
- protected final String TEXT_196 = ".getPlugin().getDialogSettings()";
- protected final String TEXT_197 = "))";
- protected final String TEXT_198 = ");" + NL + "\t\t\t\tselectionViewer.setInput(editingDomain.getResourceSet());" + NL + "\t\t\t\tselectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);" + NL + "\t\t\t\tviewerPane.setTitle(editingDomain.getResourceSet());" + NL + "" + NL + "\t\t\t\tnew AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);";
- protected final String TEXT_199 = NL + "\t\t\t\tnew ";
- protected final String TEXT_200 = "(selectionViewer, new ";
- protected final String TEXT_201 = ".EditingDomainLocationListener(editingDomain, selectionViewer));";
- protected final String TEXT_202 = NL + NL + "\t\t\t\tcreateContextMenuFor(selectionViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_SelectionPage_label\"));";
- protected final String TEXT_203 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Create a page for the parent tree view." + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
- protected final String TEXT_204 = ".this)" + NL + "\t\t\t\t\t{";
- protected final String TEXT_205 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_206 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tTree tree = new Tree(composite, SWT.MULTI);" + NL + "\t\t\t\t\t\t\tTreeViewer newTreeViewer = new TreeViewer(tree);" + NL + "\t\t\t\t\t\t\treturn newTreeViewer;" + NL + "\t\t\t\t\t\t}";
- protected final String TEXT_207 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_208 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL + "\t\t\t\tparentViewer = (TreeViewer)viewerPane.getViewer();" + NL + "\t\t\t\tparentViewer.setAutoExpandLevel(30);" + NL + "\t\t\t\tparentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\tparentViewer.setLabelProvider(new ";
- protected final String TEXT_209 = "(adapterFactory";
- protected final String TEXT_210 = ", parentViewer";
- protected final String TEXT_211 = "));" + NL + "" + NL + "\t\t\t\tcreateContextMenuFor(parentViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_ParentPage_label\"));";
- protected final String TEXT_212 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the list viewer" + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
- protected final String TEXT_213 = ".this)" + NL + "\t\t\t\t\t{";
- protected final String TEXT_214 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_215 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn new ListViewer(composite);" + NL + "\t\t\t\t\t\t}";
- protected final String TEXT_216 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_217 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "\t\t\t\tlistViewer = (ListViewer)viewerPane.getViewer();" + NL + "\t\t\t\tlistViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\tlistViewer.setLabelProvider(new ";
- protected final String TEXT_218 = "(adapterFactory";
- protected final String TEXT_219 = ", listViewer";
- protected final String TEXT_220 = "));" + NL + "" + NL + "\t\t\t\tcreateContextMenuFor(listViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_ListPage_label\"));";
- protected final String TEXT_221 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the tree viewer" + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
- protected final String TEXT_222 = ".this)" + NL + "\t\t\t\t\t{";
- protected final String TEXT_223 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_224 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn new TreeViewer(composite);" + NL + "\t\t\t\t\t\t}";
- protected final String TEXT_225 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_226 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "\t\t\t\ttreeViewer = (TreeViewer)viewerPane.getViewer();" + NL + "\t\t\t\ttreeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\ttreeViewer.setLabelProvider(";
- protected final String TEXT_227 = "new ";
- protected final String TEXT_228 = "(";
- protected final String TEXT_229 = "new ";
- protected final String TEXT_230 = "(adapterFactory";
- protected final String TEXT_231 = ", treeViewer";
- protected final String TEXT_232 = ")";
- protected final String TEXT_233 = ", new ";
- protected final String TEXT_234 = "(editingDomain";
- protected final String TEXT_235 = ".getResourceSet()";
- protected final String TEXT_236 = ", treeViewer))";
- protected final String TEXT_237 = ");" + NL + "" + NL + "\t\t\t\tnew AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);";
- protected final String TEXT_238 = NL + "\t\t\t\tnew ";
- protected final String TEXT_239 = "(treeViewer, new ";
- protected final String TEXT_240 = ".EditingDomainLocationListener(editingDomain, treeViewer));";
- protected final String TEXT_241 = NL + NL + "\t\t\t\tcreateContextMenuFor(treeViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TreePage_label\"));";
- protected final String TEXT_242 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the table viewer." + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
- protected final String TEXT_243 = ".this)" + NL + "\t\t\t\t\t{";
- protected final String TEXT_244 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_245 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn new TableViewer(composite);" + NL + "\t\t\t\t\t\t}";
- protected final String TEXT_246 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_247 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "\t\t\t\ttableViewer = (TableViewer)viewerPane.getViewer();" + NL + "" + NL + "\t\t\t\tTable table = tableViewer.getTable();" + NL + "\t\t\t\tTableLayout layout = new TableLayout();" + NL + "\t\t\t\ttable.setLayout(layout);" + NL + "\t\t\t\ttable.setHeaderVisible(true);" + NL + "\t\t\t\ttable.setLinesVisible(true);" + NL + "" + NL + "\t\t\t\tTableColumn objectColumn = new TableColumn(table, SWT.NONE);" + NL + "\t\t\t\tlayout.addColumnData(new ColumnWeightData(3, 100, true));" + NL + "\t\t\t\tobjectColumn.setText(getString(\"_UI_ObjectColumn_label\"));";
- protected final String TEXT_248 = NL + "\t\t\t\tobjectColumn.setResizable(true);" + NL + "" + NL + "\t\t\t\tTableColumn selfColumn = new TableColumn(table, SWT.NONE);" + NL + "\t\t\t\tlayout.addColumnData(new ColumnWeightData(2, 100, true));" + NL + "\t\t\t\tselfColumn.setText(getString(\"_UI_SelfColumn_label\"));";
- protected final String TEXT_249 = NL + "\t\t\t\tselfColumn.setResizable(true);" + NL + "" + NL + "\t\t\t\ttableViewer.setColumnProperties(new String [] {\"a\", \"b\"});";
- protected final String TEXT_250 = NL + "\t\t\t\ttableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\ttableViewer.setLabelProvider(";
- protected final String TEXT_251 = "new ";
- protected final String TEXT_252 = "(";
- protected final String TEXT_253 = "new ";
- protected final String TEXT_254 = "(adapterFactory";
- protected final String TEXT_255 = ", tableViewer";
- protected final String TEXT_256 = ")";
- protected final String TEXT_257 = ", new ";
- protected final String TEXT_258 = "(editingDomain";
- protected final String TEXT_259 = ".getResourceSet()";
- protected final String TEXT_260 = ", tableViewer";
- protected final String TEXT_261 = ", ";
- protected final String TEXT_262 = ".getPlugin().getDialogSettings()";
- protected final String TEXT_263 = "))";
- protected final String TEXT_264 = ");" + NL;
- protected final String TEXT_265 = NL + "\t\t\t\tnew ";
- protected final String TEXT_266 = "(tableViewer, new ";
- protected final String TEXT_267 = ".EditingDomainLocationListener(editingDomain, tableViewer));" + NL;
- protected final String TEXT_268 = NL + "\t\t\t\tcreateContextMenuFor(tableViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TablePage_label\"));";
- protected final String TEXT_269 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the table tree viewer." + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
- protected final String TEXT_270 = ".this)" + NL + "\t\t\t\t\t{";
- protected final String TEXT_271 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_272 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn new TreeViewer(composite);" + NL + "\t\t\t\t\t\t}";
- protected final String TEXT_273 = NL + "\t\t\t\t\t\t@Override";
- protected final String TEXT_274 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL + "\t\t\t\ttreeViewerWithColumns = (TreeViewer)viewerPane.getViewer();" + NL + "" + NL + "\t\t\t\tTree tree = treeViewerWithColumns.getTree();" + NL + "\t\t\t\ttree.setLayoutData(new FillLayout());" + NL + "\t\t\t\ttree.setHeaderVisible(true);" + NL + "\t\t\t\ttree.setLinesVisible(true);" + NL + "" + NL + "\t\t\t\tTreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);" + NL + "\t\t\t\tobjectColumn.setText(getString(\"_UI_ObjectColumn_label\"));";
- protected final String TEXT_275 = NL + "\t\t\t\tobjectColumn.setResizable(true);" + NL + "\t\t\t\tobjectColumn.setWidth(250);" + NL + "" + NL + "\t\t\t\tTreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);" + NL + "\t\t\t\tselfColumn.setText(getString(\"_UI_SelfColumn_label\"));";
- protected final String TEXT_276 = NL + "\t\t\t\tselfColumn.setResizable(true);" + NL + "\t\t\t\tselfColumn.setWidth(200);" + NL + "" + NL + "\t\t\t\ttreeViewerWithColumns.setColumnProperties(new String [] {\"a\", \"b\"});";
- protected final String TEXT_277 = NL + "\t\t\t\ttreeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\ttreeViewerWithColumns.setLabelProvider(";
- protected final String TEXT_278 = "new ";
- protected final String TEXT_279 = "(";
- protected final String TEXT_280 = "new ";
- protected final String TEXT_281 = "(adapterFactory";
- protected final String TEXT_282 = ", treeViewerWithColumns";
- protected final String TEXT_283 = ")";
- protected final String TEXT_284 = ", new ";
- protected final String TEXT_285 = "(editingDomain";
- protected final String TEXT_286 = ".getResourceSet()";
- protected final String TEXT_287 = ", treeViewerWithColumns";
- protected final String TEXT_288 = ", ";
- protected final String TEXT_289 = ".getPlugin().getDialogSettings()";
- protected final String TEXT_290 = "))";
- protected final String TEXT_291 = ");" + NL;
- protected final String TEXT_292 = NL + "\t\t\t\tnew ";
- protected final String TEXT_293 = "(treeViewerWithColumns, new ";
- protected final String TEXT_294 = ".EditingDomainLocationListener(editingDomain, treeViewerWithColumns));" + NL;
- protected final String TEXT_295 = NL + "\t\t\t\tcreateContextMenuFor(treeViewerWithColumns);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TreeWithColumnsPage_label\"));";
- protected final String TEXT_296 = NL + "\t\t\t}";
- protected final String TEXT_297 = NL + "\t\t\tTree tree = new Tree(getContainer(), SWT.MULTI);" + NL + "\t\t\tselectionViewer = new TreeViewer(tree);" + NL + "\t\t\tsetCurrentViewer(selectionViewer);" + NL + "" + NL + "\t\t\tselectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\tselectionViewer.setLabelProvider(";
- protected final String TEXT_298 = "new ";
- protected final String TEXT_299 = "(";
- protected final String TEXT_300 = "new ";
- protected final String TEXT_301 = "(adapterFactory";
- protected final String TEXT_302 = ", selectionViewer";
- protected final String TEXT_303 = ")";
- protected final String TEXT_304 = ", new ";
- protected final String TEXT_305 = "(editingDomain";
- protected final String TEXT_306 = ".getResourceSet()";
- protected final String TEXT_307 = ", selectionViewer";
- protected final String TEXT_308 = ", ";
- protected final String TEXT_309 = ".getPlugin().getDialogSettings()";
- protected final String TEXT_310 = "))";
- protected final String TEXT_311 = ");" + NL + "\t\t\tselectionViewer.setInput(editingDomain.getResourceSet());" + NL + "\t\t\tselectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);" + NL + "" + NL + "\t\t\tnew AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);";
- protected final String TEXT_312 = NL + "\t\t\tnew ";
- protected final String TEXT_313 = "(selectionViewer, new ";
- protected final String TEXT_314 = ".EditingDomainLocationListener(editingDomain, selectionViewer));";
- protected final String TEXT_315 = NL + NL + "\t\t\tcreateContextMenuFor(selectionViewer);" + NL + "\t\t\tint pageIndex = addPage(tree);" + NL + "\t\t\tsetPageText(pageIndex, getString(\"_UI_SelectionPage_label\"));";
- protected final String TEXT_316 = NL + NL + "\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t(new Runnable()" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t {" + NL + "\t\t\t\t\t\t setActivePage(0);" + NL + "\t\t\t\t\t }" + NL + "\t\t\t\t });" + NL + "\t\t}" + NL + "" + NL + "\t\t// Ensures that this editor will only display the page's tab" + NL + "\t\t// area if there are more than one page" + NL + "\t\t//" + NL + "\t\tgetContainer().addControlListener" + NL + "\t\t\t(new ControlAdapter()" + NL + "\t\t\t {" + NL + "\t\t\t\tboolean guard = false;";
- protected final String TEXT_317 = NL + "\t\t\t\t@Override";
- protected final String TEXT_318 = NL + "\t\t\t\tpublic void controlResized(ControlEvent event)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tif (!guard)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tguard = true;" + NL + "\t\t\t\t\t\thideTabs();" + NL + "\t\t\t\t\t\tguard = false;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t });" + NL + "" + NL + "\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t(new Runnable()" + NL + "\t\t\t {" + NL + "\t\t\t\t public void run()" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t updateProblemIndication();" + NL + "\t\t\t\t }" + NL + "\t\t\t });" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * If there is just one page in the multi-page editor part," + NL + "\t * this hides the single tab at the bottom." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void hideTabs()" + NL + "\t{" + NL + "\t\tif (getPageCount() <= 1)" + NL + "\t\t{" + NL + "\t\t\tsetPageText(0, \"\");";
- protected final String TEXT_319 = NL + "\t\t\tif (getContainer() instanceof CTabFolder)" + NL + "\t\t\t{" + NL + "\t\t\t\t((CTabFolder)getContainer()).setTabHeight(1);" + NL + "\t\t\t\tPoint point = getContainer().getSize();" + NL + "\t\t\t\tgetContainer().setSize(point.x, point.y + 6);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * If there is more than one page in the multi-page editor part," + NL + "\t * this shows the tabs at the bottom." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void showTabs()" + NL + "\t{" + NL + "\t\tif (getPageCount() > 1)" + NL + "\t\t{" + NL + "\t\t\tsetPageText(0, getString(\"_UI_SelectionPage_label\"));";
- protected final String TEXT_320 = NL + "\t\t\tif (getContainer() instanceof CTabFolder)" + NL + "\t\t\t{" + NL + "\t\t\t\t((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);" + NL + "\t\t\t\tPoint point = getContainer().getSize();" + NL + "\t\t\t\tgetContainer().setSize(point.x, point.y - 6);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is used to track the active viewer." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_321 = NL + "\t@Override";
- protected final String TEXT_322 = NL + "\tprotected void pageChange(int pageIndex)" + NL + "\t{" + NL + "\t\tsuper.pageChange(pageIndex);" + NL + "" + NL + "\t\tif (contentOutlinePage != null)" + NL + "\t\t{" + NL + "\t\t\thandleContentOutlineSelection(contentOutlinePage.getSelection());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is how the framework determines which interfaces we implement." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_323 = NL + "\t@SuppressWarnings(\"";
- protected final String TEXT_324 = "rawtypes";
- protected final String TEXT_325 = "unchecked";
- protected final String TEXT_326 = "\")";
+ protected final String TEXT_157 = NL + "\t\tpublic Object [] getElements(Object object)" + NL + "\t\t{" + NL + "\t\t\tObject parent = super.getParent(object);" + NL + "\t\t\treturn (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
+ protected final String TEXT_158 = NL + "\t\t@Override";
+ protected final String TEXT_159 = NL + "\t\tpublic Object [] getChildren(Object object)" + NL + "\t\t{" + NL + "\t\t\tObject parent = super.getParent(object);" + NL + "\t\t\treturn (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
+ protected final String TEXT_160 = NL + "\t\t@Override";
+ protected final String TEXT_161 = NL + "\t\tpublic boolean hasChildren(Object object)" + NL + "\t\t{" + NL + "\t\t\tObject parent = super.getParent(object);" + NL + "\t\t\treturn parent != null;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * <!-- begin-user-doc -->" + NL + "\t\t * <!-- end-user-doc -->" + NL + "\t\t * @generated" + NL + "\t\t */";
+ protected final String TEXT_162 = NL + "\t\t@Override";
+ protected final String TEXT_163 = NL + "\t\tpublic Object getParent(Object object)" + NL + "\t\t{" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t}";
+ protected final String TEXT_164 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setCurrentViewerPane(ViewerPane viewerPane)" + NL + "\t{" + NL + "\t\tif (currentViewerPane != viewerPane)" + NL + "\t\t{" + NL + "\t\t\tif (currentViewerPane != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tcurrentViewerPane.showFocus(false);" + NL + "\t\t\t}" + NL + "\t\t\tcurrentViewerPane = viewerPane;" + NL + "\t\t}" + NL + "\t\tsetCurrentViewer(currentViewerPane.getViewer());" + NL + "\t}";
+ protected final String TEXT_165 = NL + NL + "\t/**" + NL + "\t * This makes sure that one content viewer, either for the current page or the outline view, if it has focus," + NL + "\t * is the current one." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setCurrentViewer(Viewer viewer)" + NL + "\t{" + NL + "\t\t// If it is changing..." + NL + "\t\t//" + NL + "\t\tif (currentViewer != viewer)" + NL + "\t\t{" + NL + "\t\t\tif (selectionChangedListener == null)" + NL + "\t\t\t{" + NL + "\t\t\t\t// Create the listener on demand." + NL + "\t\t\t\t//" + NL + "\t\t\t\tselectionChangedListener =" + NL + "\t\t\t\t\tnew ISelectionChangedListener()" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t// This just notifies those things that are affected by the section." + NL + "\t\t\t\t\t\t//" + NL + "\t\t\t\t\t\tpublic void selectionChanged(SelectionChangedEvent selectionChangedEvent)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsetSelection(selectionChangedEvent.getSelection());" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Stop listening to the old one." + NL + "\t\t\t//" + NL + "\t\t\tif (currentViewer != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tcurrentViewer.removeSelectionChangedListener(selectionChangedListener);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Start listening to the new one." + NL + "\t\t\t//" + NL + "\t\t\tif (viewer != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tviewer.addSelectionChangedListener(selectionChangedListener);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Remember it." + NL + "\t\t\t//" + NL + "\t\t\tcurrentViewer = viewer;" + NL + "" + NL + "\t\t\t// Set the editors selection based on the current viewer's selection." + NL + "\t\t\t//" + NL + "\t\t\tsetSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This returns the viewer as required by the {@link IViewerProvider} interface." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Viewer getViewer()" + NL + "\t{" + NL + "\t\treturn currentViewer;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This creates a context menu for the viewer and adds a listener as well registering the menu for extension." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createContextMenuFor(StructuredViewer viewer)" + NL + "\t{" + NL + "\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\");";
+ protected final String TEXT_166 = NL + "\t\tcontextMenu.add(new Separator(\"additions\"));";
+ protected final String TEXT_167 = NL + "\t\tcontextMenu.setRemoveAllWhenShown(true);" + NL + "\t\tcontextMenu.addMenuListener(this);" + NL + "\t\tMenu menu= contextMenu.createContextMenu(viewer.getControl());" + NL + "\t\tviewer.getControl().setMenu(menu);";
+ protected final String TEXT_168 = NL + "\t\tgetSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));";
+ protected final String TEXT_169 = NL + "\t\tgetSite().registerContextMenu(contextMenu, viewer);";
+ protected final String TEXT_170 = NL + NL + "\t\tint dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;" + NL + "\t\tTransfer[] transfers = new Transfer[] { LocalTransfer.getInstance()";
+ protected final String TEXT_171 = ", LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance()";
+ protected final String TEXT_172 = " };" + NL + "\t\tviewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));" + NL + "\t\tviewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is the method called to load a resource into the editing domain's resource set based on the editor's input." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void createModel()" + NL + "\t{";
+ protected final String TEXT_173 = NL + "\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());";
+ protected final String TEXT_174 = NL + "\t\tURI resourceURI = URI.createURI(getEditorInput().getName());";
+ protected final String TEXT_175 = NL + "\t\t// Assumes that the input is a file object." + NL + "\t\t//" + NL + "\t\tIFileEditorInput modelFile = (IFileEditorInput)getEditorInput();" + NL + "\t\tURI resourceURI = URI.createPlatformResourceURI(modelFile.getFile().getFullPath().toString(), true);";
+ protected final String TEXT_176 = NL + "\t\tException exception = null;" + NL + "\t\tResource resource = null;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\t// Load the resource through the editing domain." + NL + "\t\t\t//" + NL + "\t\t\tresource = editingDomain.getResourceSet().getResource(resourceURI, true);" + NL + "\t\t}" + NL + "\t\tcatch (Exception e)" + NL + "\t\t{" + NL + "\t\t\texception = e;" + NL + "\t\t\tresource = editingDomain.getResourceSet().getResource(resourceURI, false);" + NL + "\t\t}" + NL + "" + NL + "\t\tDiagnostic diagnostic = analyzeResourceProblems(resource, exception);" + NL + "\t\tif (diagnostic.getSeverity() != Diagnostic.OK)" + NL + "\t\t{" + NL + "\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t}" + NL + "\t\teditingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns a diagnostic describing the errors and warnings listed in the resource" + NL + "\t * and the specified exception (if any)." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Diagnostic analyzeResourceProblems(Resource resource, Exception exception)" + NL + "\t{" + NL + "\t\tif (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty())" + NL + "\t\t{" + NL + "\t\t\tBasicDiagnostic basicDiagnostic =" + NL + "\t\t\t\tnew BasicDiagnostic" + NL + "\t\t\t\t\t(Diagnostic.ERROR," + NL + "\t\t\t\t\t \"";
+ protected final String TEXT_177 = "\",";
+ protected final String TEXT_178 = NL + "\t\t\t\t\t 0," + NL + "\t\t\t\t\t getString(\"_UI_CreateModelError_message\", resource.getURI()),";
+ protected final String TEXT_179 = NL + "\t\t\t\t\t new Object [] { exception == null ? (Object)resource : exception });" + NL + "\t\t\tbasicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));" + NL + "\t\t\treturn basicDiagnostic;" + NL + "\t\t}" + NL + "\t\telse if (exception != null)" + NL + "\t\t{" + NL + "\t\t\treturn" + NL + "\t\t\t\tnew BasicDiagnostic" + NL + "\t\t\t\t\t(Diagnostic.ERROR," + NL + "\t\t\t\t\t \"";
+ protected final String TEXT_180 = "\",";
+ protected final String TEXT_181 = NL + "\t\t\t\t\t 0," + NL + "\t\t\t\t\t getString(\"_UI_CreateModelError_message\", resource.getURI()),";
+ protected final String TEXT_182 = NL + "\t\t\t\t\t new Object[] { exception });" + NL + "\t\t}" + NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\treturn Diagnostic.OK_INSTANCE;" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is the method used by the framework to install your own controls." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_183 = NL + "\t@Override";
+ protected final String TEXT_184 = NL + "\tpublic void createPages()" + NL + "\t{" + NL + "\t\t// Creates the model from the editor input" + NL + "\t\t//" + NL + "\t\tcreateModel();" + NL + "" + NL + "\t\t// Only creates the other pages if there is something that can be edited" + NL + "\t\t//" + NL + "\t\tif (!getEditingDomain().getResourceSet().getResources().isEmpty())" + NL + "\t\t{" + NL + "\t\t\t// Create a page for the selection tree view." + NL + "\t\t\t//";
+ protected final String TEXT_185 = NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
+ protected final String TEXT_186 = ".this)" + NL + "\t\t\t\t\t{";
+ protected final String TEXT_187 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_188 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tTree tree = new Tree(composite, SWT.MULTI);" + NL + "\t\t\t\t\t\t\tTreeViewer newTreeViewer = new TreeViewer(tree);" + NL + "\t\t\t\t\t\t\treturn newTreeViewer;" + NL + "\t\t\t\t\t\t}";
+ protected final String TEXT_189 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_190 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL + "\t\t\t\tselectionViewer = (TreeViewer)viewerPane.getViewer();" + NL + "\t\t\t\tselectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "" + NL + "\t\t\t\tselectionViewer.setLabelProvider(";
+ protected final String TEXT_191 = "new ";
+ protected final String TEXT_192 = "(";
+ protected final String TEXT_193 = "new ";
+ protected final String TEXT_194 = "(adapterFactory";
+ protected final String TEXT_195 = ", selectionViewer";
+ protected final String TEXT_196 = ")";
+ protected final String TEXT_197 = ", new ";
+ protected final String TEXT_198 = "(editingDomain";
+ protected final String TEXT_199 = ".getResourceSet()";
+ protected final String TEXT_200 = ", selectionViewer";
+ protected final String TEXT_201 = ", ";
+ protected final String TEXT_202 = ".getPlugin().getDialogSettings()";
+ protected final String TEXT_203 = "))";
+ protected final String TEXT_204 = ");" + NL + "\t\t\t\tselectionViewer.setInput(editingDomain.getResourceSet());" + NL + "\t\t\t\tselectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);" + NL + "\t\t\t\tviewerPane.setTitle(editingDomain.getResourceSet());" + NL + "" + NL + "\t\t\t\tnew AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);";
+ protected final String TEXT_205 = NL + "\t\t\t\tnew ";
+ protected final String TEXT_206 = "(selectionViewer, new ";
+ protected final String TEXT_207 = ".EditingDomainLocationListener(editingDomain, selectionViewer));";
+ protected final String TEXT_208 = NL + NL + "\t\t\t\tcreateContextMenuFor(selectionViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_SelectionPage_label\"));";
+ protected final String TEXT_209 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// Create a page for the parent tree view." + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
+ protected final String TEXT_210 = ".this)" + NL + "\t\t\t\t\t{";
+ protected final String TEXT_211 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_212 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tTree tree = new Tree(composite, SWT.MULTI);" + NL + "\t\t\t\t\t\t\tTreeViewer newTreeViewer = new TreeViewer(tree);" + NL + "\t\t\t\t\t\t\treturn newTreeViewer;" + NL + "\t\t\t\t\t\t}";
+ protected final String TEXT_213 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_214 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL + "\t\t\t\tparentViewer = (TreeViewer)viewerPane.getViewer();" + NL + "\t\t\t\tparentViewer.setAutoExpandLevel(30);" + NL + "\t\t\t\tparentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\tparentViewer.setLabelProvider(new ";
+ protected final String TEXT_215 = "(adapterFactory";
+ protected final String TEXT_216 = ", parentViewer";
+ protected final String TEXT_217 = "));" + NL + "" + NL + "\t\t\t\tcreateContextMenuFor(parentViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_ParentPage_label\"));";
+ protected final String TEXT_218 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the list viewer" + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
+ protected final String TEXT_219 = ".this)" + NL + "\t\t\t\t\t{";
+ protected final String TEXT_220 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_221 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn new ListViewer(composite);" + NL + "\t\t\t\t\t\t}";
+ protected final String TEXT_222 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_223 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "\t\t\t\tlistViewer = (ListViewer)viewerPane.getViewer();" + NL + "\t\t\t\tlistViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\tlistViewer.setLabelProvider(new ";
+ protected final String TEXT_224 = "(adapterFactory";
+ protected final String TEXT_225 = ", listViewer";
+ protected final String TEXT_226 = "));" + NL + "" + NL + "\t\t\t\tcreateContextMenuFor(listViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_ListPage_label\"));";
+ protected final String TEXT_227 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the tree viewer" + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
+ protected final String TEXT_228 = ".this)" + NL + "\t\t\t\t\t{";
+ protected final String TEXT_229 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_230 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn new TreeViewer(composite);" + NL + "\t\t\t\t\t\t}";
+ protected final String TEXT_231 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_232 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "\t\t\t\ttreeViewer = (TreeViewer)viewerPane.getViewer();" + NL + "\t\t\t\ttreeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\ttreeViewer.setLabelProvider(";
+ protected final String TEXT_233 = "new ";
+ protected final String TEXT_234 = "(";
+ protected final String TEXT_235 = "new ";
+ protected final String TEXT_236 = "(adapterFactory";
+ protected final String TEXT_237 = ", treeViewer";
+ protected final String TEXT_238 = ")";
+ protected final String TEXT_239 = ", new ";
+ protected final String TEXT_240 = "(editingDomain";
+ protected final String TEXT_241 = ".getResourceSet()";
+ protected final String TEXT_242 = ", treeViewer))";
+ protected final String TEXT_243 = ");" + NL + "" + NL + "\t\t\t\tnew AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);";
+ protected final String TEXT_244 = NL + "\t\t\t\tnew ";
+ protected final String TEXT_245 = "(treeViewer, new ";
+ protected final String TEXT_246 = ".EditingDomainLocationListener(editingDomain, treeViewer));";
+ protected final String TEXT_247 = NL + NL + "\t\t\t\tcreateContextMenuFor(treeViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TreePage_label\"));";
+ protected final String TEXT_248 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the table viewer." + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
+ protected final String TEXT_249 = ".this)" + NL + "\t\t\t\t\t{";
+ protected final String TEXT_250 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_251 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn new TableViewer(composite);" + NL + "\t\t\t\t\t\t}";
+ protected final String TEXT_252 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_253 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "\t\t\t\ttableViewer = (TableViewer)viewerPane.getViewer();" + NL + "" + NL + "\t\t\t\tTable table = tableViewer.getTable();" + NL + "\t\t\t\tTableLayout layout = new TableLayout();" + NL + "\t\t\t\ttable.setLayout(layout);" + NL + "\t\t\t\ttable.setHeaderVisible(true);" + NL + "\t\t\t\ttable.setLinesVisible(true);" + NL + "" + NL + "\t\t\t\tTableColumn objectColumn = new TableColumn(table, SWT.NONE);" + NL + "\t\t\t\tlayout.addColumnData(new ColumnWeightData(3, 100, true));" + NL + "\t\t\t\tobjectColumn.setText(getString(\"_UI_ObjectColumn_label\"));";
+ protected final String TEXT_254 = NL + "\t\t\t\tobjectColumn.setResizable(true);" + NL + "" + NL + "\t\t\t\tTableColumn selfColumn = new TableColumn(table, SWT.NONE);" + NL + "\t\t\t\tlayout.addColumnData(new ColumnWeightData(2, 100, true));" + NL + "\t\t\t\tselfColumn.setText(getString(\"_UI_SelfColumn_label\"));";
+ protected final String TEXT_255 = NL + "\t\t\t\tselfColumn.setResizable(true);" + NL + "" + NL + "\t\t\t\ttableViewer.setColumnProperties(new String [] {\"a\", \"b\"});";
+ protected final String TEXT_256 = NL + "\t\t\t\ttableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\ttableViewer.setLabelProvider(";
+ protected final String TEXT_257 = "new ";
+ protected final String TEXT_258 = "(";
+ protected final String TEXT_259 = "new ";
+ protected final String TEXT_260 = "(adapterFactory";
+ protected final String TEXT_261 = ", tableViewer";
+ protected final String TEXT_262 = ")";
+ protected final String TEXT_263 = ", new ";
+ protected final String TEXT_264 = "(editingDomain";
+ protected final String TEXT_265 = ".getResourceSet()";
+ protected final String TEXT_266 = ", tableViewer";
+ protected final String TEXT_267 = ", ";
+ protected final String TEXT_268 = ".getPlugin().getDialogSettings()";
+ protected final String TEXT_269 = "))";
+ protected final String TEXT_270 = ");" + NL;
+ protected final String TEXT_271 = NL + "\t\t\t\tnew ";
+ protected final String TEXT_272 = "(tableViewer, new ";
+ protected final String TEXT_273 = ".EditingDomainLocationListener(editingDomain, tableViewer));" + NL;
+ protected final String TEXT_274 = NL + "\t\t\t\tcreateContextMenuFor(tableViewer);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TablePage_label\"));";
+ protected final String TEXT_275 = NL + "\t\t\t}" + NL + "" + NL + "\t\t\t// This is the page for the table tree viewer." + NL + "\t\t\t//" + NL + "\t\t\t{" + NL + "\t\t\t\tViewerPane viewerPane =" + NL + "\t\t\t\t\tnew ViewerPane(getSite().getPage(), ";
+ protected final String TEXT_276 = ".this)" + NL + "\t\t\t\t\t{";
+ protected final String TEXT_277 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_278 = NL + "\t\t\t\t\t\tpublic Viewer createViewer(Composite composite)" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\treturn new TreeViewer(composite);" + NL + "\t\t\t\t\t\t}";
+ protected final String TEXT_279 = NL + "\t\t\t\t\t\t@Override";
+ protected final String TEXT_280 = NL + "\t\t\t\t\t\tpublic void requestActivation()" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\tsuper.requestActivation();" + NL + "\t\t\t\t\t\t\tsetCurrentViewerPane(this);" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t};" + NL + "\t\t\t\tviewerPane.createControl(getContainer());" + NL + "" + NL + "\t\t\t\ttreeViewerWithColumns = (TreeViewer)viewerPane.getViewer();" + NL + "" + NL + "\t\t\t\tTree tree = treeViewerWithColumns.getTree();" + NL + "\t\t\t\ttree.setLayoutData(new FillLayout());" + NL + "\t\t\t\ttree.setHeaderVisible(true);" + NL + "\t\t\t\ttree.setLinesVisible(true);" + NL + "" + NL + "\t\t\t\tTreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);" + NL + "\t\t\t\tobjectColumn.setText(getString(\"_UI_ObjectColumn_label\"));";
+ protected final String TEXT_281 = NL + "\t\t\t\tobjectColumn.setResizable(true);" + NL + "\t\t\t\tobjectColumn.setWidth(250);" + NL + "" + NL + "\t\t\t\tTreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);" + NL + "\t\t\t\tselfColumn.setText(getString(\"_UI_SelfColumn_label\"));";
+ protected final String TEXT_282 = NL + "\t\t\t\tselfColumn.setResizable(true);" + NL + "\t\t\t\tselfColumn.setWidth(200);" + NL + "" + NL + "\t\t\t\ttreeViewerWithColumns.setColumnProperties(new String [] {\"a\", \"b\"});";
+ protected final String TEXT_283 = NL + "\t\t\t\ttreeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\ttreeViewerWithColumns.setLabelProvider(";
+ protected final String TEXT_284 = "new ";
+ protected final String TEXT_285 = "(";
+ protected final String TEXT_286 = "new ";
+ protected final String TEXT_287 = "(adapterFactory";
+ protected final String TEXT_288 = ", treeViewerWithColumns";
+ protected final String TEXT_289 = ")";
+ protected final String TEXT_290 = ", new ";
+ protected final String TEXT_291 = "(editingDomain";
+ protected final String TEXT_292 = ".getResourceSet()";
+ protected final String TEXT_293 = ", treeViewerWithColumns";
+ protected final String TEXT_294 = ", ";
+ protected final String TEXT_295 = ".getPlugin().getDialogSettings()";
+ protected final String TEXT_296 = "))";
+ protected final String TEXT_297 = ");" + NL;
+ protected final String TEXT_298 = NL + "\t\t\t\tnew ";
+ protected final String TEXT_299 = "(treeViewerWithColumns, new ";
+ protected final String TEXT_300 = ".EditingDomainLocationListener(editingDomain, treeViewerWithColumns));" + NL;
+ protected final String TEXT_301 = NL + "\t\t\t\tcreateContextMenuFor(treeViewerWithColumns);" + NL + "\t\t\t\tint pageIndex = addPage(viewerPane.getControl());" + NL + "\t\t\t\tsetPageText(pageIndex, getString(\"_UI_TreeWithColumnsPage_label\"));";
+ protected final String TEXT_302 = NL + "\t\t\t}";
+ protected final String TEXT_303 = NL + "\t\t\tTree tree = new Tree(getContainer(), SWT.MULTI);" + NL + "\t\t\tselectionViewer = new TreeViewer(tree);" + NL + "\t\t\tsetCurrentViewer(selectionViewer);" + NL + "" + NL + "\t\t\tselectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\tselectionViewer.setLabelProvider(";
+ protected final String TEXT_304 = "new ";
+ protected final String TEXT_305 = "(";
+ protected final String TEXT_306 = "new ";
+ protected final String TEXT_307 = "(adapterFactory";
+ protected final String TEXT_308 = ", selectionViewer";
+ protected final String TEXT_309 = ")";
+ protected final String TEXT_310 = ", new ";
+ protected final String TEXT_311 = "(editingDomain";
+ protected final String TEXT_312 = ".getResourceSet()";
+ protected final String TEXT_313 = ", selectionViewer";
+ protected final String TEXT_314 = ", ";
+ protected final String TEXT_315 = ".getPlugin().getDialogSettings()";
+ protected final String TEXT_316 = "))";
+ protected final String TEXT_317 = ");" + NL + "\t\t\tselectionViewer.setInput(editingDomain.getResourceSet());" + NL + "\t\t\tselectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);" + NL + "" + NL + "\t\t\tnew AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);";
+ protected final String TEXT_318 = NL + "\t\t\tnew ";
+ protected final String TEXT_319 = "(selectionViewer, new ";
+ protected final String TEXT_320 = ".EditingDomainLocationListener(editingDomain, selectionViewer));";
+ protected final String TEXT_321 = NL + NL + "\t\t\tcreateContextMenuFor(selectionViewer);" + NL + "\t\t\tint pageIndex = addPage(tree);" + NL + "\t\t\tsetPageText(pageIndex, getString(\"_UI_SelectionPage_label\"));";
+ protected final String TEXT_322 = NL + NL + "\t\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t\t(new Runnable()" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t public void run()" + NL + "\t\t\t\t\t {" + NL + "\t\t\t\t\t\t setActivePage(0);" + NL + "\t\t\t\t\t }" + NL + "\t\t\t\t });" + NL + "\t\t}" + NL + "" + NL + "\t\t// Ensures that this editor will only display the page's tab" + NL + "\t\t// area if there are more than one page" + NL + "\t\t//" + NL + "\t\tgetContainer().addControlListener" + NL + "\t\t\t(new ControlAdapter()" + NL + "\t\t\t {" + NL + "\t\t\t\tboolean guard = false;";
+ protected final String TEXT_323 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_324 = NL + "\t\t\t\tpublic void controlResized(ControlEvent event)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tif (!guard)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tguard = true;" + NL + "\t\t\t\t\t\thideTabs();" + NL + "\t\t\t\t\t\tguard = false;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t });" + NL + "" + NL + "\t\tgetSite().getShell().getDisplay().asyncExec" + NL + "\t\t\t(new Runnable()" + NL + "\t\t\t {" + NL + "\t\t\t\t public void run()" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t updateProblemIndication();" + NL + "\t\t\t\t }" + NL + "\t\t\t });" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * If there is just one page in the multi-page editor part," + NL + "\t * this hides the single tab at the bottom." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void hideTabs()" + NL + "\t{" + NL + "\t\tif (getPageCount() <= 1)" + NL + "\t\t{" + NL + "\t\t\tsetPageText(0, \"\");";
+ protected final String TEXT_325 = NL + "\t\t\tif (getContainer() instanceof CTabFolder)" + NL + "\t\t\t{" + NL + "\t\t\t\t((CTabFolder)getContainer()).setTabHeight(1);" + NL + "\t\t\t\tPoint point = getContainer().getSize();" + NL + "\t\t\t\tgetContainer().setSize(point.x, point.y + 6);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * If there is more than one page in the multi-page editor part," + NL + "\t * this shows the tabs at the bottom." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void showTabs()" + NL + "\t{" + NL + "\t\tif (getPageCount() > 1)" + NL + "\t\t{" + NL + "\t\t\tsetPageText(0, getString(\"_UI_SelectionPage_label\"));";
+ protected final String TEXT_326 = NL + "\t\t\tif (getContainer() instanceof CTabFolder)" + NL + "\t\t\t{" + NL + "\t\t\t\t((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);" + NL + "\t\t\t\tPoint point = getContainer().getSize();" + NL + "\t\t\t\tgetContainer().setSize(point.x, point.y - 6);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is used to track the active viewer." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
protected final String TEXT_327 = NL + "\t@Override";
- protected final String TEXT_328 = NL + "\tpublic Object getAdapter(Class key)" + NL + "\t{" + NL + "\t\tif (key.equals(IContentOutlinePage.class))" + NL + "\t\t{" + NL + "\t\t\treturn showOutlineView() ? getContentOutlinePage() : null;" + NL + "\t\t}" + NL + "\t\telse if (key.equals(IPropertySheetPage.class))" + NL + "\t\t{" + NL + "\t\t\treturn getPropertySheetPage();" + NL + "\t\t}";
- protected final String TEXT_329 = NL + "\t\telse if (key.equals(IGotoMarker.class))" + NL + "\t\t{" + NL + "\t\t\treturn this;" + NL + "\t\t}";
- protected final String TEXT_330 = NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\treturn super.getAdapter(key);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This accesses a cached version of the content outliner." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IContentOutlinePage getContentOutlinePage()" + NL + "\t{" + NL + "\t\tif (contentOutlinePage == null)" + NL + "\t\t{" + NL + "\t\t\t// The content outline is just a tree." + NL + "\t\t\t//" + NL + "\t\t\tclass MyContentOutlinePage extends ContentOutlinePage" + NL + "\t\t\t{";
- protected final String TEXT_331 = NL + "\t\t\t\t@Override";
- protected final String TEXT_332 = NL + "\t\t\t\tpublic void createControl(Composite parent)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.createControl(parent);" + NL + "\t\t\t\t\tcontentOutlineViewer = getTreeViewer();" + NL + "\t\t\t\t\tcontentOutlineViewer.addSelectionChangedListener(this);" + NL + "" + NL + "\t\t\t\t\t// Set up the tree viewer." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tcontentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\t\tcontentOutlineViewer.setLabelProvider(";
- protected final String TEXT_333 = "new ";
- protected final String TEXT_334 = "(";
- protected final String TEXT_335 = "new ";
- protected final String TEXT_336 = "(adapterFactory";
- protected final String TEXT_337 = ", contentOutlineViewer";
- protected final String TEXT_338 = ")";
- protected final String TEXT_339 = ", new ";
- protected final String TEXT_340 = "(editingDomain";
- protected final String TEXT_341 = ".getResourceSet()";
- protected final String TEXT_342 = ", contentOutlineViewer";
- protected final String TEXT_343 = ", ";
- protected final String TEXT_344 = ".getPlugin().getDialogSettings()";
- protected final String TEXT_345 = "))";
- protected final String TEXT_346 = ");" + NL + "\t\t\t\t\tcontentOutlineViewer.setInput(editingDomain.getResourceSet());" + NL;
- protected final String TEXT_347 = NL + "\t\t\t\t\tnew ";
- protected final String TEXT_348 = "(contentOutlineViewer, new ";
- protected final String TEXT_349 = ".EditingDomainLocationListener(editingDomain, contentOutlineViewer));" + NL;
- protected final String TEXT_350 = NL + "\t\t\t\t\t// Make sure our popups work." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tcreateContextMenuFor(contentOutlineViewer);" + NL + "" + NL + "\t\t\t\t\tif (!editingDomain.getResourceSet().getResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t // Select the root object in the view." + NL + "\t\t\t\t\t //" + NL + "\t\t\t\t\t contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL;
- protected final String TEXT_351 = NL + "\t\t\t\t@Override";
- protected final String TEXT_352 = NL + "\t\t\t\tpublic void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.makeContributions(menuManager, toolBarManager, statusLineManager);" + NL + "\t\t\t\t\tcontentOutlineStatusLineManager = statusLineManager;" + NL + "\t\t\t\t}" + NL;
- protected final String TEXT_353 = NL + "\t\t\t\t@Override";
- protected final String TEXT_354 = NL + "\t\t\t\tpublic void setActionBars(IActionBars actionBars)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.setActionBars(actionBars);" + NL + "\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this, actionBars);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tcontentOutlinePage = new MyContentOutlinePage();" + NL + "" + NL + "\t\t\t// Listen to selection so that we can handle it is a special way." + NL + "\t\t\t//" + NL + "\t\t\tcontentOutlinePage.addSelectionChangedListener" + NL + "\t\t\t\t(new ISelectionChangedListener()" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t // This ensures that we handle selections correctly." + NL + "\t\t\t\t\t //" + NL + "\t\t\t\t\t public void selectionChanged(SelectionChangedEvent event)" + NL + "\t\t\t\t\t {" + NL + "\t\t\t\t\t\t handleContentOutlineSelection(event.getSelection());" + NL + "\t\t\t\t\t }" + NL + "\t\t\t\t });" + NL + "\t\t}" + NL + "" + NL + "\t\treturn contentOutlinePage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This accesses a cached version of the property sheet." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IPropertySheetPage getPropertySheetPage()" + NL + "\t{" + NL + "\t\tif (propertySheetPage == null)" + NL + "\t\t{" + NL + "\t\t\tpropertySheetPage =" + NL + "\t\t\t\tnew ExtendedPropertySheetPage(editingDomain";
- protected final String TEXT_355 = ", ExtendedPropertySheetPage.Decoration.MANUAL";
- protected final String TEXT_356 = ", ExtendedPropertySheetPage.Decoration.LIVE, ";
- protected final String TEXT_357 = ".getPlugin().getDialogSettings()";
- protected final String TEXT_358 = ")" + NL + "\t\t\t\t{";
- protected final String TEXT_359 = NL + "\t\t\t\t\t@Override";
- protected final String TEXT_360 = NL + "\t\t\t\t\tpublic void setSelectionToViewer(";
- protected final String TEXT_361 = " selection)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\t";
- protected final String TEXT_362 = ".this.setSelectionToViewer(selection);" + NL + "\t\t\t\t\t\t";
- protected final String TEXT_363 = ".this.setFocus();" + NL + "\t\t\t\t\t}" + NL;
- protected final String TEXT_364 = NL + "\t\t\t\t\t@Override";
- protected final String TEXT_365 = NL + "\t\t\t\t\tpublic void setActionBars(IActionBars actionBars)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tsuper.setActionBars(actionBars);" + NL + "\t\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this, actionBars);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\tpropertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t}" + NL + "" + NL + "\t\treturn propertySheetPage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This deals with how we want selection in the outliner to affect the other views." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void handleContentOutlineSelection(ISelection selection)" + NL + "\t{";
- protected final String TEXT_366 = NL + "\t\tif (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection)";
- protected final String TEXT_367 = NL + "\t\tif (selectionViewer != null && !selection.isEmpty() && selection instanceof IStructuredSelection)";
- protected final String TEXT_368 = NL + "\t\t{" + NL + "\t\t\tIterator";
- protected final String TEXT_369 = "<?>";
- protected final String TEXT_370 = " selectedElements = ((IStructuredSelection)selection).iterator();" + NL + "\t\t\tif (selectedElements.hasNext())" + NL + "\t\t\t{" + NL + "\t\t\t\t// Get the first selected element." + NL + "\t\t\t\t//" + NL + "\t\t\t\tObject selectedElement = selectedElements.next();" + NL;
- protected final String TEXT_371 = NL + "\t\t\t\t// If it's the selection viewer, then we want it to select the same selection as this selection." + NL + "\t\t\t\t//" + NL + "\t\t\t\tif (currentViewerPane.getViewer() == selectionViewer)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
- protected final String TEXT_372 = " selectionList = new ";
- protected final String TEXT_373 = "();" + NL + "\t\t\t\t\tselectionList.add(selectedElement);" + NL + "\t\t\t\t\twhile (selectedElements.hasNext())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tselectionList.add(selectedElements.next());" + NL + "\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t// Set the selection to the widget." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tselectionViewer.setSelection(new StructuredSelection(selectionList));" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t// Set the input to the widget." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tif (currentViewerPane.getViewer().getInput() != selectedElement)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tcurrentViewerPane.getViewer().setInput(selectedElement);" + NL + "\t\t\t\t\t\tcurrentViewerPane.setTitle(selectedElement);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
- protected final String TEXT_374 = NL + "\t\t\t\t";
- protected final String TEXT_375 = " selectionList = new ";
- protected final String TEXT_376 = "();" + NL + "\t\t\t\tselectionList.add(selectedElement);" + NL + "\t\t\t\twhile (selectedElements.hasNext())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tselectionList.add(selectedElements.next());" + NL + "\t\t\t\t}" + NL + "" + NL + "\t\t\t\t// Set the selection to the widget." + NL + "\t\t\t\t//" + NL + "\t\t\t\tselectionViewer.setSelection(new StructuredSelection(selectionList));";
- protected final String TEXT_377 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is for implementing {@link IEditorPart} and simply tests the command stack." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_378 = NL + "\t@Override";
- protected final String TEXT_379 = NL + "\tpublic boolean isDirty()" + NL + "\t{" + NL + "\t\treturn ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is for implementing {@link IEditorPart} and simply saves the model file." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_380 = NL + "\t@Override";
- protected final String TEXT_381 = NL + "\tpublic void doSave(IProgressMonitor progressMonitor)" + NL + "\t{" + NL + "\t\t// Save only resources that have actually changed." + NL + "\t\t//" + NL + "\t\tfinal ";
- protected final String TEXT_382 = " saveOptions = new ";
- protected final String TEXT_383 = "();";
- protected final String TEXT_384 = NL + "\t\tsaveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);";
- protected final String TEXT_385 = NL + "\t\tsaveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);";
- protected final String TEXT_386 = NL + NL + "\t\t// Do the work within an operation because this is a long running activity that modifies the workbench." + NL + "\t\t//" + NL + "\t\t";
- protected final String TEXT_387 = " operation =" + NL + "\t\t\tnew ";
- protected final String TEXT_388 = "()" + NL + "\t\t\t{" + NL + "\t\t\t\t// This is the method that gets invoked when the operation runs." + NL + "\t\t\t\t//";
- protected final String TEXT_389 = NL + "\t\t\t\t@Override";
- protected final String TEXT_390 = NL + "\t\t\t\tpublic void ";
- protected final String TEXT_391 = "(IProgressMonitor monitor)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t// Save the resources to the file system." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tboolean first = true;";
- protected final String TEXT_392 = NL + "\t\t\t\t\tfor (Resource resource : editingDomain.getResourceSet().getResources())";
- protected final String TEXT_393 = NL + "\t\t\t\t\tfor (Iterator i = editingDomain.getResourceSet().getResources().iterator(); i.hasNext(); )";
- protected final String TEXT_394 = NL + "\t\t\t\t\t{";
- protected final String TEXT_395 = NL + "\t\t\t\t\t\tResource resource = (Resource)i.next();";
- protected final String TEXT_396 = NL + "\t\t\t\t\t\tif ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource))" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\ttry" + NL + "\t\t\t\t\t\t\t{";
- protected final String TEXT_397 = NL + "\t\t\t\t\t\t\t\tlong timeStamp = resource.getTimeStamp();" + NL + "\t\t\t\t\t\t\t\tresource.save(saveOptions);" + NL + "\t\t\t\t\t\t\t\tif (resource.getTimeStamp() != timeStamp)" + NL + "\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\tsavedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t}";
- protected final String TEXT_398 = NL + "\t\t\t\t\t\t\t\tresource.save(saveOptions);" + NL + "\t\t\t\t\t\t\t\tsavedResources.add(resource);";
- protected final String TEXT_399 = NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tcatch (Exception exception)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tfirst = false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "" + NL + "\t\tupdateProblemIndication = false;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\t// This runs the options, and shows progress." + NL + "\t\t\t//" + NL + "\t\t\tnew ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);" + NL + "" + NL + "\t\t\t// Refresh the necessary state." + NL + "\t\t\t//" + NL + "\t\t\t((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();" + NL + "\t\t\tfirePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "\t\t}" + NL + "\t\tcatch (Exception exception)" + NL + "\t\t{" + NL + "\t\t\t// Something went wrong that shouldn't." + NL + "\t\t\t//" + NL + "\t\t\t";
- protected final String TEXT_400 = ".INSTANCE.log(exception);" + NL + "\t\t}" + NL + "\t\tupdateProblemIndication = true;" + NL + "\t\tupdateProblemIndication();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This returns whether something has been persisted to the URI of the specified resource." + NL + "\t * The implementation uses the URI converter from the editor's resource set to try to open an input stream." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isPersisted(Resource resource)" + NL + "\t{" + NL + "\t\tboolean result = false;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\tInputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());" + NL + "\t\t\tif (stream != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tresult = true;" + NL + "\t\t\t\tstream.close();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (IOException e)" + NL + "\t\t{" + NL + "\t\t\t// Ignore" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This always returns true because it is not currently supported." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_401 = NL + "\t@Override";
- protected final String TEXT_402 = NL + "\tpublic boolean isSaveAsAllowed()" + NL + "\t{" + NL + "\t\treturn true;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This also changes the editor's input." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_403 = NL + "\t@Override";
- protected final String TEXT_404 = NL + "\tpublic void doSaveAs()" + NL + "\t{";
- protected final String TEXT_405 = NL + "\t\tnew ";
- protected final String TEXT_406 = "(getSite().getShell(), null, SWT.NONE)" + NL + "\t\t\t{";
- protected final String TEXT_407 = NL + "\t\t\t\t@Override";
- protected final String TEXT_408 = NL + "\t\t\t\tprotected boolean isSave()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL;
- protected final String TEXT_409 = NL + "\t\t\t\t@Override";
- protected final String TEXT_410 = NL + "\t\t\t\tprotected boolean processResources()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
- protected final String TEXT_411 = " uris = getURIs();" + NL + "\t\t\t\t\tif (uris.size() > 0)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tURI uri = ";
- protected final String TEXT_412 = "uris.get(0);" + NL + "\t\t\t\t\t\tdoSaveAs(uri, new ";
- protected final String TEXT_413 = "(uri));" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\telse" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}.open();";
- protected final String TEXT_414 = NL + "\t\tString[] filters = ";
- protected final String TEXT_415 = "(String[])";
- protected final String TEXT_416 = "FILE_EXTENSION_FILTERS.toArray(new String[FILE_EXTENSION_FILTERS.size()]);" + NL + "\t\tString[] files = ";
- protected final String TEXT_417 = ".openFilePathDialog(getSite().getShell(), ";
- protected final String TEXT_418 = ".SAVE, filters);" + NL + "\t\tif (files.length > 0)" + NL + "\t\t{" + NL + "\t\t\tURI uri = URI.createFileURI(files[0]);" + NL + "\t\t\tdoSaveAs(uri, new ";
- protected final String TEXT_419 = "(uri));" + NL + "\t\t}";
- protected final String TEXT_420 = NL + "\t\tSaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());" + NL + "\t\tsaveAsDialog.open();" + NL + "\t\tIPath path = saveAsDialog.getResult();" + NL + "\t\tif (path != null)" + NL + "\t\t{" + NL + "\t\t\tIFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);" + NL + "\t\t\tif (file != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tdoSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));" + NL + "\t\t\t}" + NL + "\t\t}";
- protected final String TEXT_421 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void doSaveAs(URI uri, IEditorInput editorInput)" + NL + "\t{" + NL + "\t\t(";
- protected final String TEXT_422 = "(Resource)";
- protected final String TEXT_423 = "editingDomain.getResourceSet().getResources().get(0)).setURI(uri);" + NL + "\t\tsetInputWithNotify(editorInput);" + NL + "\t\tsetPartName(editorInput.getName());" + NL + "\t\tIProgressMonitor progressMonitor =" + NL + "\t\t\tgetActionBars().getStatusLineManager() != null ?" + NL + "\t\t\t\tgetActionBars().getStatusLineManager().getProgressMonitor() :" + NL + "\t\t\t\tnew ";
- protected final String TEXT_424 = "();" + NL + "\t\tdoSave(progressMonitor);" + NL + "\t}";
- protected final String TEXT_425 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void gotoMarker(IMarker marker)" + NL + "\t{";
- protected final String TEXT_426 = NL + "\t\t";
- protected final String TEXT_427 = " targetObjects = markerHelper.getTargetObjects(editingDomain, marker);" + NL + "\t\tif (!targetObjects.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tsetSelectionToViewer(targetObjects);" + NL + "\t\t}";
- protected final String TEXT_428 = NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\tif (marker.isSubtypeOf(EValidator.MARKER))" + NL + "\t\t\t{" + NL + "\t\t\t\tString uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);" + NL + "\t\t\t\tif (uriAttribute != null)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tURI uri = URI.createURI(uriAttribute);" + NL + "\t\t\t\t\tEObject eObject = editingDomain.getResourceSet().getEObject(uri, true);" + NL + "\t\t\t\t\tif (eObject != null)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (CoreException exception)" + NL + "\t\t{" + NL + "\t\t\t";
- protected final String TEXT_429 = ".INSTANCE.log(exception);" + NL + "\t\t}";
- protected final String TEXT_430 = NL + "\t}";
- protected final String TEXT_431 = NL + NL + "\t/**" + NL + "\t * This is called during startup." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_432 = NL + "\t@Override";
- protected final String TEXT_433 = NL + "\tpublic void init(IEditorSite site, IEditorInput editorInput)" + NL + "\t{" + NL + "\t\tsetSite(site);" + NL + "\t\tsetInputWithNotify(editorInput);" + NL + "\t\tsetPartName(editorInput.getName());" + NL + "\t\tsite.setSelectionProvider(this);" + NL + "\t\tsite.getPage().addPartListener(partListener);";
- protected final String TEXT_434 = NL + "\t\tResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);";
- protected final String TEXT_435 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_436 = NL + "\t@Override";
- protected final String TEXT_437 = NL + "\tpublic void setFocus()" + NL + "\t{";
- protected final String TEXT_438 = NL + "\t\tif (currentViewerPane != null)" + NL + "\t\t{" + NL + "\t\t\tcurrentViewerPane.setFocus();" + NL + "\t\t}" + NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\tgetControl(getActivePage()).setFocus();" + NL + "\t\t}";
- protected final String TEXT_439 = NL + "\t\tgetControl(getActivePage()).setFocus();";
- protected final String TEXT_440 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addSelectionChangedListener(ISelectionChangedListener listener)" + NL + "\t{" + NL + "\t\tselectionChangedListeners.add(listener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeSelectionChangedListener(ISelectionChangedListener listener)" + NL + "\t{" + NL + "\t\tselectionChangedListeners.remove(listener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ISelection getSelection()" + NL + "\t{" + NL + "\t\treturn editorSelection;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection." + NL + "\t * Calling this result will notify the listeners." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setSelection(ISelection selection)" + NL + "\t{" + NL + "\t\teditorSelection = selection;" + NL;
- protected final String TEXT_441 = NL + "\t\tfor (ISelectionChangedListener listener : selectionChangedListeners)";
- protected final String TEXT_442 = NL + "\t\tfor (Iterator listeners = selectionChangedListeners.iterator(); listeners.hasNext(); )";
- protected final String TEXT_443 = NL + "\t\t{";
- protected final String TEXT_444 = NL + "\t\t\tISelectionChangedListener listener = (ISelectionChangedListener)listeners.next();";
- protected final String TEXT_445 = NL + "\t\t\tlistener.selectionChanged(new SelectionChangedEvent(this, selection));" + NL + "\t\t}" + NL + "\t\tsetStatusLineManager(selection);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setStatusLineManager(ISelection selection)" + NL + "\t{" + NL + "\t\tIStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?" + NL + "\t\t\tcontentOutlineStatusLineManager : getActionBars().getStatusLineManager();" + NL + "" + NL + "\t\tif (statusLineManager != null)" + NL + "\t\t{" + NL + "\t\t\tif (selection instanceof IStructuredSelection)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
- protected final String TEXT_446 = " collection = ((IStructuredSelection)selection).toList();" + NL + "\t\t\t\tswitch (collection.size())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tcase 0:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_NoObjectSelected\"));";
- protected final String TEXT_447 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tcase 1:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tString text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_SingleObjectSelected\", text));";
- protected final String TEXT_448 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tdefault:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_MultiObjectSelected\", Integer.toString(collection.size())));";
- protected final String TEXT_449 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\telse" + NL + "\t\t\t{" + NL + "\t\t\t\tstatusLineManager.setMessage(\"\");";
- protected final String TEXT_450 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This looks up a string in the plugin's plugin.properties file." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static String getString(String key)" + NL + "\t{" + NL + "\t\treturn ";
- protected final String TEXT_451 = ".INSTANCE.getString(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This looks up a string in plugin.properties, making a substitution." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static String getString(String key, Object s1)" + NL + "\t{" + NL + "\t\treturn ";
- protected final String TEXT_452 = ".INSTANCE.getString(key, new Object [] { s1 });" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void menuAboutToShow(IMenuManager menuManager)" + NL + "\t{" + NL + "\t\t((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditingDomainActionBarContributor getActionBarContributor()" + NL + "\t{" + NL + "\t\treturn (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IActionBars getActionBars()" + NL + "\t{" + NL + "\t\treturn getActionBarContributor().getActionBars();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic AdapterFactory getAdapterFactory()" + NL + "\t{" + NL + "\t\treturn adapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_453 = NL + "\t@Override";
- protected final String TEXT_454 = NL + "\tpublic void dispose()" + NL + "\t{" + NL + "\t\tupdateProblemIndication = false;" + NL;
- protected final String TEXT_455 = NL + "\t\tResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);" + NL;
- protected final String TEXT_456 = NL + "\t\tgetSite().getPage().removePartListener(partListener);" + NL + "" + NL + "\t\tadapterFactory.dispose();" + NL + "" + NL + "\t\tif (getActionBarContributor().getActiveEditor() == this)" + NL + "\t\t{" + NL + "\t\t\tgetActionBarContributor().setActiveEditor(null);" + NL + "\t\t}" + NL + "" + NL + "\t\tif (propertySheetPage != null)" + NL + "\t\t{" + NL + "\t\t\tpropertySheetPage.dispose();" + NL + "\t\t}" + NL + "" + NL + "\t\tif (contentOutlinePage != null)" + NL + "\t\t{" + NL + "\t\t\tcontentOutlinePage.dispose();" + NL + "\t\t}" + NL + "" + NL + "\t\tsuper.dispose();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns whether the outline view should be presented to the user." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean showOutlineView()" + NL + "\t{" + NL + "\t\treturn ";
- protected final String TEXT_457 = ";" + NL + "\t}" + NL + "}";
- protected final String TEXT_458 = NL;
+ protected final String TEXT_328 = NL + "\tprotected void pageChange(int pageIndex)" + NL + "\t{" + NL + "\t\tsuper.pageChange(pageIndex);" + NL + "" + NL + "\t\tif (contentOutlinePage != null)" + NL + "\t\t{" + NL + "\t\t\thandleContentOutlineSelection(contentOutlinePage.getSelection());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is how the framework determines which interfaces we implement." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_329 = NL + "\t@SuppressWarnings(\"";
+ protected final String TEXT_330 = "rawtypes";
+ protected final String TEXT_331 = "unchecked";
+ protected final String TEXT_332 = "\")";
+ protected final String TEXT_333 = NL + "\t@Override";
+ protected final String TEXT_334 = NL + "\tpublic Object getAdapter(Class key)" + NL + "\t{" + NL + "\t\tif (key.equals(IContentOutlinePage.class))" + NL + "\t\t{" + NL + "\t\t\treturn showOutlineView() ? getContentOutlinePage() : null;" + NL + "\t\t}" + NL + "\t\telse if (key.equals(IPropertySheetPage.class))" + NL + "\t\t{" + NL + "\t\t\treturn getPropertySheetPage();" + NL + "\t\t}";
+ protected final String TEXT_335 = NL + "\t\telse if (key.equals(IGotoMarker.class))" + NL + "\t\t{" + NL + "\t\t\treturn this;" + NL + "\t\t}";
+ protected final String TEXT_336 = NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\treturn super.getAdapter(key);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This accesses a cached version of the content outliner." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IContentOutlinePage getContentOutlinePage()" + NL + "\t{" + NL + "\t\tif (contentOutlinePage == null)" + NL + "\t\t{" + NL + "\t\t\t// The content outline is just a tree." + NL + "\t\t\t//" + NL + "\t\t\tclass MyContentOutlinePage extends ContentOutlinePage" + NL + "\t\t\t{";
+ protected final String TEXT_337 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_338 = NL + "\t\t\t\tpublic void createControl(Composite parent)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.createControl(parent);" + NL + "\t\t\t\t\tcontentOutlineViewer = getTreeViewer();" + NL + "\t\t\t\t\tcontentOutlineViewer.addSelectionChangedListener(this);" + NL + "" + NL + "\t\t\t\t\t// Set up the tree viewer." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tcontentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\t\tcontentOutlineViewer.setLabelProvider(";
+ protected final String TEXT_339 = "new ";
+ protected final String TEXT_340 = "(";
+ protected final String TEXT_341 = "new ";
+ protected final String TEXT_342 = "(adapterFactory";
+ protected final String TEXT_343 = ", contentOutlineViewer";
+ protected final String TEXT_344 = ")";
+ protected final String TEXT_345 = ", new ";
+ protected final String TEXT_346 = "(editingDomain";
+ protected final String TEXT_347 = ".getResourceSet()";
+ protected final String TEXT_348 = ", contentOutlineViewer";
+ protected final String TEXT_349 = ", ";
+ protected final String TEXT_350 = ".getPlugin().getDialogSettings()";
+ protected final String TEXT_351 = "))";
+ protected final String TEXT_352 = ");" + NL + "\t\t\t\t\tcontentOutlineViewer.setInput(editingDomain.getResourceSet());" + NL;
+ protected final String TEXT_353 = NL + "\t\t\t\t\tnew ";
+ protected final String TEXT_354 = "(contentOutlineViewer, new ";
+ protected final String TEXT_355 = ".EditingDomainLocationListener(editingDomain, contentOutlineViewer));" + NL;
+ protected final String TEXT_356 = NL + "\t\t\t\t\t// Make sure our popups work." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tcreateContextMenuFor(contentOutlineViewer);" + NL + "" + NL + "\t\t\t\t\tif (!editingDomain.getResourceSet().getResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t // Select the root object in the view." + NL + "\t\t\t\t\t //" + NL + "\t\t\t\t\t contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL;
+ protected final String TEXT_357 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_358 = NL + "\t\t\t\tpublic void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.makeContributions(menuManager, toolBarManager, statusLineManager);" + NL + "\t\t\t\t\tcontentOutlineStatusLineManager = statusLineManager;" + NL + "\t\t\t\t}" + NL;
+ protected final String TEXT_359 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_360 = NL + "\t\t\t\tpublic void setActionBars(IActionBars actionBars)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.setActionBars(actionBars);" + NL + "\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this, actionBars);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tcontentOutlinePage = new MyContentOutlinePage();" + NL + "" + NL + "\t\t\t// Listen to selection so that we can handle it is a special way." + NL + "\t\t\t//" + NL + "\t\t\tcontentOutlinePage.addSelectionChangedListener" + NL + "\t\t\t\t(new ISelectionChangedListener()" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t // This ensures that we handle selections correctly." + NL + "\t\t\t\t\t //" + NL + "\t\t\t\t\t public void selectionChanged(SelectionChangedEvent event)" + NL + "\t\t\t\t\t {" + NL + "\t\t\t\t\t\t handleContentOutlineSelection(event.getSelection());" + NL + "\t\t\t\t\t }" + NL + "\t\t\t\t });" + NL + "\t\t}" + NL + "" + NL + "\t\treturn contentOutlinePage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This accesses a cached version of the property sheet." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IPropertySheetPage getPropertySheetPage()" + NL + "\t{" + NL + "\t\tPropertySheetPage propertySheetPage =" + NL + "\t\t\tnew ExtendedPropertySheetPage(editingDomain";
+ protected final String TEXT_361 = ", ExtendedPropertySheetPage.Decoration.MANUAL";
+ protected final String TEXT_362 = ", ExtendedPropertySheetPage.Decoration.LIVE, ";
+ protected final String TEXT_363 = ".getPlugin().getDialogSettings()";
+ protected final String TEXT_364 = ")" + NL + "\t\t\t{";
+ protected final String TEXT_365 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_366 = NL + "\t\t\t\tpublic void setSelectionToViewer(";
+ protected final String TEXT_367 = " selection)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
+ protected final String TEXT_368 = ".this.setSelectionToViewer(selection);" + NL + "\t\t\t\t\t";
+ protected final String TEXT_369 = ".this.setFocus();" + NL + "\t\t\t\t}" + NL;
+ protected final String TEXT_370 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_371 = NL + "\t\t\t\tpublic void setActionBars(IActionBars actionBars)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.setActionBars(actionBars);" + NL + "\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this, actionBars);" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\tpropertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\tpropertySheetPages.add(propertySheetPage);" + NL + "" + NL + "\t\treturn propertySheetPage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This deals with how we want selection in the outliner to affect the other views." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void handleContentOutlineSelection(ISelection selection)" + NL + "\t{";
+ protected final String TEXT_372 = NL + "\t\tif (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection)";
+ protected final String TEXT_373 = NL + "\t\tif (selectionViewer != null && !selection.isEmpty() && selection instanceof IStructuredSelection)";
+ protected final String TEXT_374 = NL + "\t\t{" + NL + "\t\t\tIterator";
+ protected final String TEXT_375 = "<?>";
+ protected final String TEXT_376 = " selectedElements = ((IStructuredSelection)selection).iterator();" + NL + "\t\t\tif (selectedElements.hasNext())" + NL + "\t\t\t{" + NL + "\t\t\t\t// Get the first selected element." + NL + "\t\t\t\t//" + NL + "\t\t\t\tObject selectedElement = selectedElements.next();" + NL;
+ protected final String TEXT_377 = NL + "\t\t\t\t// If it's the selection viewer, then we want it to select the same selection as this selection." + NL + "\t\t\t\t//" + NL + "\t\t\t\tif (currentViewerPane.getViewer() == selectionViewer)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
+ protected final String TEXT_378 = " selectionList = new ";
+ protected final String TEXT_379 = "();" + NL + "\t\t\t\t\tselectionList.add(selectedElement);" + NL + "\t\t\t\t\twhile (selectedElements.hasNext())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tselectionList.add(selectedElements.next());" + NL + "\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t// Set the selection to the widget." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tselectionViewer.setSelection(new StructuredSelection(selectionList));" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t// Set the input to the widget." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tif (currentViewerPane.getViewer().getInput() != selectedElement)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tcurrentViewerPane.getViewer().setInput(selectedElement);" + NL + "\t\t\t\t\t\tcurrentViewerPane.setTitle(selectedElement);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
+ protected final String TEXT_380 = NL + "\t\t\t\t";
+ protected final String TEXT_381 = " selectionList = new ";
+ protected final String TEXT_382 = "();" + NL + "\t\t\t\tselectionList.add(selectedElement);" + NL + "\t\t\t\twhile (selectedElements.hasNext())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tselectionList.add(selectedElements.next());" + NL + "\t\t\t\t}" + NL + "" + NL + "\t\t\t\t// Set the selection to the widget." + NL + "\t\t\t\t//" + NL + "\t\t\t\tselectionViewer.setSelection(new StructuredSelection(selectionList));";
+ protected final String TEXT_383 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is for implementing {@link IEditorPart} and simply tests the command stack." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_384 = NL + "\t@Override";
+ protected final String TEXT_385 = NL + "\tpublic boolean isDirty()" + NL + "\t{" + NL + "\t\treturn ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is for implementing {@link IEditorPart} and simply saves the model file." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_386 = NL + "\t@Override";
+ protected final String TEXT_387 = NL + "\tpublic void doSave(IProgressMonitor progressMonitor)" + NL + "\t{" + NL + "\t\t// Save only resources that have actually changed." + NL + "\t\t//" + NL + "\t\tfinal ";
+ protected final String TEXT_388 = " saveOptions = new ";
+ protected final String TEXT_389 = "();";
+ protected final String TEXT_390 = NL + "\t\tsaveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);";
+ protected final String TEXT_391 = NL + "\t\tsaveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);";
+ protected final String TEXT_392 = NL + NL + "\t\t// Do the work within an operation because this is a long running activity that modifies the workbench." + NL + "\t\t//" + NL + "\t\t";
+ protected final String TEXT_393 = " operation =" + NL + "\t\t\tnew ";
+ protected final String TEXT_394 = "()" + NL + "\t\t\t{" + NL + "\t\t\t\t// This is the method that gets invoked when the operation runs." + NL + "\t\t\t\t//";
+ protected final String TEXT_395 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_396 = NL + "\t\t\t\tpublic void ";
+ protected final String TEXT_397 = "(IProgressMonitor monitor)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t// Save the resources to the file system." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tboolean first = true;";
+ protected final String TEXT_398 = NL + "\t\t\t\t\tfor (Resource resource : editingDomain.getResourceSet().getResources())";
+ protected final String TEXT_399 = NL + "\t\t\t\t\tfor (Iterator i = editingDomain.getResourceSet().getResources().iterator(); i.hasNext(); )";
+ protected final String TEXT_400 = NL + "\t\t\t\t\t{";
+ protected final String TEXT_401 = NL + "\t\t\t\t\t\tResource resource = (Resource)i.next();";
+ protected final String TEXT_402 = NL + "\t\t\t\t\t\tif ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource))" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\ttry" + NL + "\t\t\t\t\t\t\t{";
+ protected final String TEXT_403 = NL + "\t\t\t\t\t\t\t\tlong timeStamp = resource.getTimeStamp();" + NL + "\t\t\t\t\t\t\t\tresource.save(saveOptions);" + NL + "\t\t\t\t\t\t\t\tif (resource.getTimeStamp() != timeStamp)" + NL + "\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\tsavedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t}";
+ protected final String TEXT_404 = NL + "\t\t\t\t\t\t\t\tresource.save(saveOptions);" + NL + "\t\t\t\t\t\t\t\tsavedResources.add(resource);";
+ protected final String TEXT_405 = NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tcatch (Exception exception)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tfirst = false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "" + NL + "\t\tupdateProblemIndication = false;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\t// This runs the options, and shows progress." + NL + "\t\t\t//" + NL + "\t\t\tnew ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);" + NL + "" + NL + "\t\t\t// Refresh the necessary state." + NL + "\t\t\t//" + NL + "\t\t\t((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();" + NL + "\t\t\tfirePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "\t\t}" + NL + "\t\tcatch (Exception exception)" + NL + "\t\t{" + NL + "\t\t\t// Something went wrong that shouldn't." + NL + "\t\t\t//" + NL + "\t\t\t";
+ protected final String TEXT_406 = ".INSTANCE.log(exception);" + NL + "\t\t}" + NL + "\t\tupdateProblemIndication = true;" + NL + "\t\tupdateProblemIndication();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This returns whether something has been persisted to the URI of the specified resource." + NL + "\t * The implementation uses the URI converter from the editor's resource set to try to open an input stream." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isPersisted(Resource resource)" + NL + "\t{" + NL + "\t\tboolean result = false;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\tInputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());" + NL + "\t\t\tif (stream != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tresult = true;" + NL + "\t\t\t\tstream.close();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (IOException e)" + NL + "\t\t{" + NL + "\t\t\t// Ignore" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This always returns true because it is not currently supported." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_407 = NL + "\t@Override";
+ protected final String TEXT_408 = NL + "\tpublic boolean isSaveAsAllowed()" + NL + "\t{" + NL + "\t\treturn true;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This also changes the editor's input." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_409 = NL + "\t@Override";
+ protected final String TEXT_410 = NL + "\tpublic void doSaveAs()" + NL + "\t{";
+ protected final String TEXT_411 = NL + "\t\tnew ";
+ protected final String TEXT_412 = "(getSite().getShell(), null, SWT.NONE)" + NL + "\t\t\t{";
+ protected final String TEXT_413 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_414 = NL + "\t\t\t\tprotected boolean isSave()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL;
+ protected final String TEXT_415 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_416 = NL + "\t\t\t\tprotected boolean processResources()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
+ protected final String TEXT_417 = " uris = getURIs();" + NL + "\t\t\t\t\tif (uris.size() > 0)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tURI uri = ";
+ protected final String TEXT_418 = "uris.get(0);" + NL + "\t\t\t\t\t\tdoSaveAs(uri, new ";
+ protected final String TEXT_419 = "(uri));" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\telse" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}.open();";
+ protected final String TEXT_420 = NL + "\t\tString[] filters = ";
+ protected final String TEXT_421 = "(String[])";
+ protected final String TEXT_422 = "FILE_EXTENSION_FILTERS.toArray(new String[FILE_EXTENSION_FILTERS.size()]);" + NL + "\t\tString[] files = ";
+ protected final String TEXT_423 = ".openFilePathDialog(getSite().getShell(), ";
+ protected final String TEXT_424 = ".SAVE, filters);" + NL + "\t\tif (files.length > 0)" + NL + "\t\t{" + NL + "\t\t\tURI uri = URI.createFileURI(files[0]);" + NL + "\t\t\tdoSaveAs(uri, new ";
+ protected final String TEXT_425 = "(uri));" + NL + "\t\t}";
+ protected final String TEXT_426 = NL + "\t\tSaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());" + NL + "\t\tsaveAsDialog.open();" + NL + "\t\tIPath path = saveAsDialog.getResult();" + NL + "\t\tif (path != null)" + NL + "\t\t{" + NL + "\t\t\tIFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);" + NL + "\t\t\tif (file != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tdoSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));" + NL + "\t\t\t}" + NL + "\t\t}";
+ protected final String TEXT_427 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void doSaveAs(URI uri, IEditorInput editorInput)" + NL + "\t{" + NL + "\t\t(";
+ protected final String TEXT_428 = "(Resource)";
+ protected final String TEXT_429 = "editingDomain.getResourceSet().getResources().get(0)).setURI(uri);" + NL + "\t\tsetInputWithNotify(editorInput);" + NL + "\t\tsetPartName(editorInput.getName());" + NL + "\t\tIProgressMonitor progressMonitor =" + NL + "\t\t\tgetActionBars().getStatusLineManager() != null ?" + NL + "\t\t\t\tgetActionBars().getStatusLineManager().getProgressMonitor() :" + NL + "\t\t\t\tnew ";
+ protected final String TEXT_430 = "();" + NL + "\t\tdoSave(progressMonitor);" + NL + "\t}";
+ protected final String TEXT_431 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void gotoMarker(IMarker marker)" + NL + "\t{";
+ protected final String TEXT_432 = NL + "\t\t";
+ protected final String TEXT_433 = " targetObjects = markerHelper.getTargetObjects(editingDomain, marker);" + NL + "\t\tif (!targetObjects.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tsetSelectionToViewer(targetObjects);" + NL + "\t\t}";
+ protected final String TEXT_434 = NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\tif (marker.isSubtypeOf(EValidator.MARKER))" + NL + "\t\t\t{" + NL + "\t\t\t\tString uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);" + NL + "\t\t\t\tif (uriAttribute != null)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tURI uri = URI.createURI(uriAttribute);" + NL + "\t\t\t\t\tEObject eObject = editingDomain.getResourceSet().getEObject(uri, true);" + NL + "\t\t\t\t\tif (eObject != null)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (CoreException exception)" + NL + "\t\t{" + NL + "\t\t\t";
+ protected final String TEXT_435 = ".INSTANCE.log(exception);" + NL + "\t\t}";
+ protected final String TEXT_436 = NL + "\t}";
+ protected final String TEXT_437 = NL + NL + "\t/**" + NL + "\t * This is called during startup." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_438 = NL + "\t@Override";
+ protected final String TEXT_439 = NL + "\tpublic void init(IEditorSite site, IEditorInput editorInput)" + NL + "\t{" + NL + "\t\tsetSite(site);" + NL + "\t\tsetInputWithNotify(editorInput);" + NL + "\t\tsetPartName(editorInput.getName());" + NL + "\t\tsite.setSelectionProvider(this);" + NL + "\t\tsite.getPage().addPartListener(partListener);";
+ protected final String TEXT_440 = NL + "\t\tResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);";
+ protected final String TEXT_441 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_442 = NL + "\t@Override";
+ protected final String TEXT_443 = NL + "\tpublic void setFocus()" + NL + "\t{";
+ protected final String TEXT_444 = NL + "\t\tif (currentViewerPane != null)" + NL + "\t\t{" + NL + "\t\t\tcurrentViewerPane.setFocus();" + NL + "\t\t}" + NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\tgetControl(getActivePage()).setFocus();" + NL + "\t\t}";
+ protected final String TEXT_445 = NL + "\t\tgetControl(getActivePage()).setFocus();";
+ protected final String TEXT_446 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addSelectionChangedListener(ISelectionChangedListener listener)" + NL + "\t{" + NL + "\t\tselectionChangedListeners.add(listener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeSelectionChangedListener(ISelectionChangedListener listener)" + NL + "\t{" + NL + "\t\tselectionChangedListeners.remove(listener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ISelection getSelection()" + NL + "\t{" + NL + "\t\treturn editorSelection;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection." + NL + "\t * Calling this result will notify the listeners." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setSelection(ISelection selection)" + NL + "\t{" + NL + "\t\teditorSelection = selection;" + NL;
+ protected final String TEXT_447 = NL + "\t\tfor (ISelectionChangedListener listener : selectionChangedListeners)";
+ protected final String TEXT_448 = NL + "\t\tfor (Iterator listeners = selectionChangedListeners.iterator(); listeners.hasNext(); )";
+ protected final String TEXT_449 = NL + "\t\t{";
+ protected final String TEXT_450 = NL + "\t\t\tISelectionChangedListener listener = (ISelectionChangedListener)listeners.next();";
+ protected final String TEXT_451 = NL + "\t\t\tlistener.selectionChanged(new SelectionChangedEvent(this, selection));" + NL + "\t\t}" + NL + "\t\tsetStatusLineManager(selection);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setStatusLineManager(ISelection selection)" + NL + "\t{" + NL + "\t\tIStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?" + NL + "\t\t\tcontentOutlineStatusLineManager : getActionBars().getStatusLineManager();" + NL + "" + NL + "\t\tif (statusLineManager != null)" + NL + "\t\t{" + NL + "\t\t\tif (selection instanceof IStructuredSelection)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
+ protected final String TEXT_452 = " collection = ((IStructuredSelection)selection).toList();" + NL + "\t\t\t\tswitch (collection.size())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tcase 0:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_NoObjectSelected\"));";
+ protected final String TEXT_453 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tcase 1:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tString text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_SingleObjectSelected\", text));";
+ protected final String TEXT_454 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tdefault:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_MultiObjectSelected\", Integer.toString(collection.size())));";
+ protected final String TEXT_455 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\telse" + NL + "\t\t\t{" + NL + "\t\t\t\tstatusLineManager.setMessage(\"\");";
+ protected final String TEXT_456 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This looks up a string in the plugin's plugin.properties file." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static String getString(String key)" + NL + "\t{" + NL + "\t\treturn ";
+ protected final String TEXT_457 = ".INSTANCE.getString(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This looks up a string in plugin.properties, making a substitution." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static String getString(String key, Object s1)" + NL + "\t{" + NL + "\t\treturn ";
+ protected final String TEXT_458 = ".INSTANCE.getString(key, new Object [] { s1 });" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void menuAboutToShow(IMenuManager menuManager)" + NL + "\t{" + NL + "\t\t((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditingDomainActionBarContributor getActionBarContributor()" + NL + "\t{" + NL + "\t\treturn (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IActionBars getActionBars()" + NL + "\t{" + NL + "\t\treturn getActionBarContributor().getActionBars();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic AdapterFactory getAdapterFactory()" + NL + "\t{" + NL + "\t\treturn adapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_459 = NL + "\t@Override";
+ protected final String TEXT_460 = NL + "\tpublic void dispose()" + NL + "\t{" + NL + "\t\tupdateProblemIndication = false;" + NL;
+ protected final String TEXT_461 = NL + "\t\tResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);" + NL;
+ protected final String TEXT_462 = NL + "\t\tgetSite().getPage().removePartListener(partListener);" + NL + "" + NL + "\t\tadapterFactory.dispose();" + NL + "" + NL + "\t\tif (getActionBarContributor().getActiveEditor() == this)" + NL + "\t\t{" + NL + "\t\t\tgetActionBarContributor().setActiveEditor(null);" + NL + "\t\t}" + NL;
+ protected final String TEXT_463 = NL + "\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages)";
+ protected final String TEXT_464 = NL + "\t\tfor (Iterator i = propertySheetPages.iterator(); i.hasNext(); )";
+ protected final String TEXT_465 = NL + "\t\t{";
+ protected final String TEXT_466 = NL + "\t\t\tPropertySheetPage propertySheetPage = (PropertySheetPage)i.next();";
+ protected final String TEXT_467 = NL + "\t\t\tpropertySheetPage.dispose();" + NL + "\t\t}" + NL + "" + NL + "\t\tif (contentOutlinePage != null)" + NL + "\t\t{" + NL + "\t\t\tcontentOutlinePage.dispose();" + NL + "\t\t}" + NL + "" + NL + "\t\tsuper.dispose();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns whether the outline view should be presented to the user." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean showOutlineView()" + NL + "\t{" + NL + "\t\treturn ";
+ protected final String TEXT_468 = ";" + NL + "\t}" + NL + "}";
+ protected final String TEXT_469 = NL;
public String generate(Object argument)
{
@@ -508,6 +519,8 @@ public class Editor
String _AdapterFactoryLabelProvider = "AdapterFactoryLabelProvider" + (genModel.isFontProviders() && genModel.isColorProviders() ? ".FontAndColorProvider" : genModel.isFontProviders() ? ".FontProvider" : genModel.isColorProviders() ? ".ColorProvider" : "");
String _ArrayListOfString = "ArrayList" + (genModel.useGenerics() ? "<String>" : "");
String _ListOfString = "List" + (genModel.useGenerics() ? "<String>" : "");
+ String _ListOfPropertySheetPage = "List" + (genModel.useGenerics() ? "<PropertySheetPage>" : "");
+ String _ArrayListOfPropertySheetPage = "ArrayList" + (genModel.useGenerics() ? "<PropertySheetPage>" : "");
stringBuffer.append(TEXT_1);
stringBuffer.append(TEXT_2);
{GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;
@@ -657,27 +670,27 @@ public class Editor
stringBuffer.append(TEXT_70);
}
stringBuffer.append(TEXT_71);
- if (genPackage.isMultipleEditorPages()) {
+ stringBuffer.append(_ListOfPropertySheetPage);
stringBuffer.append(TEXT_72);
- }
+ stringBuffer.append(_ArrayListOfPropertySheetPage);
stringBuffer.append(TEXT_73);
- stringBuffer.append(_CollectionOfSelectionChangedListener);
+ if (genPackage.isMultipleEditorPages()) {
stringBuffer.append(TEXT_74);
- stringBuffer.append(_ArrayListOfSelectionChangedListener);
+ }
stringBuffer.append(TEXT_75);
- if (!genModel.isRichClientPlatform()) {
+ stringBuffer.append(_CollectionOfSelectionChangedListener);
stringBuffer.append(TEXT_76);
- }
+ stringBuffer.append(_ArrayListOfSelectionChangedListener);
stringBuffer.append(TEXT_77);
- stringBuffer.append(genPackage.getEditorClassName());
+ if (!genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_78);
- stringBuffer.append(genPackage.getEditorClassName());
+ }
stringBuffer.append(TEXT_79);
stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_80);
- stringBuffer.append(_CollectionOfResource);
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_81);
- stringBuffer.append(_ArrayListOfResource);
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_82);
stringBuffer.append(_CollectionOfResource);
stringBuffer.append(TEXT_83);
@@ -687,13 +700,13 @@ public class Editor
stringBuffer.append(TEXT_85);
stringBuffer.append(_ArrayListOfResource);
stringBuffer.append(TEXT_86);
- stringBuffer.append(_MapOfResourceToDiagnostic);
+ stringBuffer.append(_CollectionOfResource);
stringBuffer.append(TEXT_87);
- stringBuffer.append(_LinkedHashMapOfResourceToDiagnostic);
+ stringBuffer.append(_ArrayListOfResource);
stringBuffer.append(TEXT_88);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(_MapOfResourceToDiagnostic);
stringBuffer.append(TEXT_89);
- }
+ stringBuffer.append(_LinkedHashMapOfResourceToDiagnostic);
stringBuffer.append(TEXT_90);
if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_91);
@@ -703,541 +716,541 @@ public class Editor
stringBuffer.append(TEXT_93);
}
stringBuffer.append(TEXT_94);
- if (!genModel.isRichClientPlatform()) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_95);
- stringBuffer.append(_CollectionOfResource);
+ }
stringBuffer.append(TEXT_96);
- stringBuffer.append(_ArrayListOfResource);
+ if (!genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_97);
stringBuffer.append(_CollectionOfResource);
stringBuffer.append(TEXT_98);
stringBuffer.append(_ArrayListOfResource);
stringBuffer.append(TEXT_99);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ stringBuffer.append(_CollectionOfResource);
stringBuffer.append(TEXT_100);
- }
+ stringBuffer.append(_ArrayListOfResource);
stringBuffer.append(TEXT_101);
- if (genModel.getDecoration() == GenDecoration.NONE) {
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_102);
}
stringBuffer.append(TEXT_103);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ if (genModel.getDecoration() == GenDecoration.NONE) {
stringBuffer.append(TEXT_104);
}
stringBuffer.append(TEXT_105);
- if (genModel.getDecoration() == GenDecoration.NONE) {
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_106);
- } else {
+ }
stringBuffer.append(TEXT_107);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ if (genModel.getDecoration() == GenDecoration.NONE) {
stringBuffer.append(TEXT_108);
- }
+ } else {
stringBuffer.append(TEXT_109);
- stringBuffer.append(_CollectionOfResource);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_110);
- stringBuffer.append(_CollectionOfResource);
+ }
stringBuffer.append(TEXT_111);
- stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(_CollectionOfResource);
stringBuffer.append(TEXT_112);
- stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(_CollectionOfResource);
stringBuffer.append(TEXT_113);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_114);
- }
- stringBuffer.append(TEXT_115);
stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(TEXT_115);
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_116);
- if (genModel.useGenerics()) {
+ }
stringBuffer.append(TEXT_117);
- } else {
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_118);
- }
+ if (genModel.useGenerics()) {
stringBuffer.append(TEXT_119);
- if (!genModel.useGenerics()) {
+ } else {
stringBuffer.append(TEXT_120);
}
stringBuffer.append(TEXT_121);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_122);
}
stringBuffer.append(TEXT_123);
- stringBuffer.append(genPackage.getGenModel().getEditorPluginID());
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
stringBuffer.append(TEXT_124);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_125);
- if (genModel.useGenerics()) {
+ stringBuffer.append(genPackage.getGenModel().getEditorPluginID());
stringBuffer.append(TEXT_126);
- } else {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_127);
- }
+ if (genModel.useGenerics()) {
stringBuffer.append(TEXT_128);
- if (!genModel.useGenerics()) {
+ } else {
stringBuffer.append(TEXT_129);
}
stringBuffer.append(TEXT_130);
- if (!genModel.isRichClientPlatform()) {
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_131);
}
stringBuffer.append(TEXT_132);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_133);
if (!genModel.isRichClientPlatform()) {
+ stringBuffer.append(TEXT_133);
+ }
stringBuffer.append(TEXT_134);
stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_135);
- }
+ if (!genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_136);
- stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_137);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_138);
- stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_139);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(TEXT_140);
+ stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(TEXT_141);
for (GenPackage aGenPackage : genModel.getAllGenPackagesWithClassifiers()) {
if (!aGenPackage.getGenClasses().isEmpty() && aGenPackage.getGenModel().hasEditSupport()) {
- stringBuffer.append(TEXT_140);
+ stringBuffer.append(TEXT_142);
stringBuffer.append(aGenPackage.getImportedItemProviderAdapterFactoryClassName());
- stringBuffer.append(TEXT_141);
+ stringBuffer.append(TEXT_143);
}
}
for (GenPackage aGenPackage : genModel.getAllUsedGenPackagesWithClassifiers()) {
if (!aGenPackage.getGenClasses().isEmpty() && aGenPackage.getGenModel().hasEditSupport()) {
- stringBuffer.append(TEXT_142);
+ stringBuffer.append(TEXT_144);
stringBuffer.append(aGenPackage.getImportedItemProviderAdapterFactoryClassName());
- stringBuffer.append(TEXT_143);
+ stringBuffer.append(TEXT_145);
}
}
//Editor/addItemproviderFactories.override.javajetinc"
- stringBuffer.append(TEXT_144);
- stringBuffer.append(_HashMapOfResourceToBoolean);
- stringBuffer.append(TEXT_145);
- if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_146);
- }
+ if (genModel.useGenerics()) {
stringBuffer.append(TEXT_147);
- stringBuffer.append(_CollectionOfAnything);
+ }
stringBuffer.append(TEXT_148);
- stringBuffer.append(_CollectionOfAnything);
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_149);
- if (genModel.useClassOverrideAnnotation()) {
- stringBuffer.append(TEXT_150);
}
+ stringBuffer.append(TEXT_150);
+ stringBuffer.append(_HashMapOfResourceToBoolean);
stringBuffer.append(TEXT_151);
if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_152);
}
stringBuffer.append(TEXT_153);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(_CollectionOfAnything);
stringBuffer.append(TEXT_154);
- }
+ stringBuffer.append(_CollectionOfAnything);
stringBuffer.append(TEXT_155);
if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_156);
}
stringBuffer.append(TEXT_157);
- if (genPackage.isMultipleEditorPages()) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_158);
}
stringBuffer.append(TEXT_159);
- stringBuffer.append(genModel.getNonNLS());
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_160);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_161);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_162);
- } else {
- stringBuffer.append(TEXT_163);
}
+ stringBuffer.append(TEXT_163);
+ if (genPackage.isMultipleEditorPages()) {
stringBuffer.append(TEXT_164);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF29_VALUE) {
- stringBuffer.append(TEXT_165);
}
+ stringBuffer.append(TEXT_165);
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_166);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_167);
- } else if (genModel.isRichClientPlatform()) {
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
stringBuffer.append(TEXT_168);
} else {
stringBuffer.append(TEXT_169);
}
stringBuffer.append(TEXT_170);
- stringBuffer.append(genPackage.getGenModel().getEditorPluginID());
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF29_VALUE) {
stringBuffer.append(TEXT_171);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_172);
- stringBuffer.append(genModel.getNonNLS());
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
stringBuffer.append(TEXT_173);
- stringBuffer.append(genPackage.getGenModel().getEditorPluginID());
+ } else if (genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_174);
- stringBuffer.append(genModel.getNonNLS());
+ } else {
stringBuffer.append(TEXT_175);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_176);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(genPackage.getGenModel().getEditorPluginID());
stringBuffer.append(TEXT_177);
- }
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_178);
- if (genPackage.isMultipleEditorPages()) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_179);
- stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(genPackage.getGenModel().getEditorPluginID());
stringBuffer.append(TEXT_180);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_181);
- }
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_182);
if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_183);
}
stringBuffer.append(TEXT_184);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ if (genPackage.isMultipleEditorPages()) {
stringBuffer.append(TEXT_185);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_186);
- }
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_187);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ }
stringBuffer.append(TEXT_188);
- if (useExtendedLabelProvider) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_189);
}
stringBuffer.append(TEXT_190);
if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_191);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
stringBuffer.append(TEXT_192);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
- stringBuffer.append(TEXT_193);
}
+ stringBuffer.append(TEXT_193);
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_194);
- if (genModel.getDecoration() == GenDecoration.LIVE) {
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_195);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_196);
}
+ stringBuffer.append(TEXT_196);
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_197);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_198);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_199);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
+ }
stringBuffer.append(TEXT_200);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ if (genModel.getDecoration() == GenDecoration.LIVE) {
stringBuffer.append(TEXT_201);
- }
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_202);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_203);
- stringBuffer.append(genPackage.getEditorClassName());
+ }
stringBuffer.append(TEXT_204);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_205);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
stringBuffer.append(TEXT_206);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_207);
}
stringBuffer.append(TEXT_208);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_209);
- if (useExtendedLabelProvider) {
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_210);
- }
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_211);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_212);
- stringBuffer.append(genPackage.getEditorClassName());
- stringBuffer.append(TEXT_213);
if (genModel.useClassOverrideAnnotation()) {
- stringBuffer.append(TEXT_214);
+ stringBuffer.append(TEXT_213);
}
+ stringBuffer.append(TEXT_214);
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_215);
- if (genModel.useClassOverrideAnnotation()) {
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_216);
}
stringBuffer.append(TEXT_217);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_218);
- if (useExtendedLabelProvider) {
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_219);
- }
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_220);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_221);
- stringBuffer.append(genPackage.getEditorClassName());
- stringBuffer.append(TEXT_222);
if (genModel.useClassOverrideAnnotation()) {
- stringBuffer.append(TEXT_223);
+ stringBuffer.append(TEXT_222);
}
+ stringBuffer.append(TEXT_223);
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_224);
- if (genModel.useClassOverrideAnnotation()) {
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_225);
}
stringBuffer.append(TEXT_226);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_227);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_228);
- }
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_229);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ }
stringBuffer.append(TEXT_230);
- if (useExtendedLabelProvider) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_231);
}
stringBuffer.append(TEXT_232);
if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_233);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
stringBuffer.append(TEXT_234);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
- stringBuffer.append(TEXT_235);
}
+ stringBuffer.append(TEXT_235);
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_236);
- }
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_237);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ }
stringBuffer.append(TEXT_238);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_239);
stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_240);
- }
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_241);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_242);
- stringBuffer.append(genPackage.getEditorClassName());
+ }
stringBuffer.append(TEXT_243);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_244);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
stringBuffer.append(TEXT_245);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_246);
}
stringBuffer.append(TEXT_247);
stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_248);
- stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_249);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(genModel.getNonNLS(2));
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_250);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ }
stringBuffer.append(TEXT_251);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_252);
}
stringBuffer.append(TEXT_253);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_254);
- if (useExtendedLabelProvider) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_255);
- }
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genModel.getNonNLS(2));
stringBuffer.append(TEXT_256);
if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_257);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
stringBuffer.append(TEXT_258);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
- stringBuffer.append(TEXT_259);
}
+ stringBuffer.append(TEXT_259);
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_260);
- if (genModel.getDecoration() == GenDecoration.LIVE) {
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_261);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_262);
}
+ stringBuffer.append(TEXT_262);
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_263);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_264);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_265);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
+ }
stringBuffer.append(TEXT_266);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ if (genModel.getDecoration() == GenDecoration.LIVE) {
stringBuffer.append(TEXT_267);
- }
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_268);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_269);
- stringBuffer.append(genPackage.getEditorClassName());
+ }
stringBuffer.append(TEXT_270);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_271);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
stringBuffer.append(TEXT_272);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_273);
}
stringBuffer.append(TEXT_274);
stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_275);
- stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_276);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(genModel.getNonNLS(2));
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_277);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ }
stringBuffer.append(TEXT_278);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_279);
}
stringBuffer.append(TEXT_280);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_281);
- if (useExtendedLabelProvider) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_282);
- }
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genModel.getNonNLS(2));
stringBuffer.append(TEXT_283);
if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_284);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
stringBuffer.append(TEXT_285);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
- stringBuffer.append(TEXT_286);
}
+ stringBuffer.append(TEXT_286);
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_287);
- if (genModel.getDecoration() == GenDecoration.LIVE) {
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_288);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_289);
}
+ stringBuffer.append(TEXT_289);
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_290);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_291);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_292);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
+ }
stringBuffer.append(TEXT_293);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ if (genModel.getDecoration() == GenDecoration.LIVE) {
stringBuffer.append(TEXT_294);
- }
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_295);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_296);
- } else {
+ }
stringBuffer.append(TEXT_297);
if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_298);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
stringBuffer.append(TEXT_299);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_300);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ }
stringBuffer.append(TEXT_301);
- if (useExtendedLabelProvider) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_302);
- }
+ } else {
stringBuffer.append(TEXT_303);
if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_304);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
stringBuffer.append(TEXT_305);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
- stringBuffer.append(TEXT_306);
}
+ stringBuffer.append(TEXT_306);
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_307);
- if (genModel.getDecoration() == GenDecoration.LIVE) {
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_308);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_309);
}
+ stringBuffer.append(TEXT_309);
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_310);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_311);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_312);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
+ }
stringBuffer.append(TEXT_313);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ if (genModel.getDecoration() == GenDecoration.LIVE) {
stringBuffer.append(TEXT_314);
- }
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_315);
- stringBuffer.append(genModel.getNonNLS());
}
stringBuffer.append(TEXT_316);
- if (genModel.useClassOverrideAnnotation()) {
- stringBuffer.append(TEXT_317);
}
+ stringBuffer.append(TEXT_317);
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_318);
- stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
stringBuffer.append(TEXT_319);
- stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_320);
- if (genModel.useClassOverrideAnnotation()) {
+ }
stringBuffer.append(TEXT_321);
+ stringBuffer.append(genModel.getNonNLS());
}
stringBuffer.append(TEXT_322);
- if (genModel.useGenerics()) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_323);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE) {
+ }
stringBuffer.append(TEXT_324);
- } else {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_325);
- }
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_326);
- }
if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_327);
}
stringBuffer.append(TEXT_328);
- if (!genModel.isRichClientPlatform()) {
+ if (genModel.useGenerics()) {
stringBuffer.append(TEXT_329);
- }
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE) {
stringBuffer.append(TEXT_330);
- if (genModel.useClassOverrideAnnotation()) {
+ } else {
stringBuffer.append(TEXT_331);
}
stringBuffer.append(TEXT_332);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ }
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_333);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
- stringBuffer.append(TEXT_334);
}
+ stringBuffer.append(TEXT_334);
+ if (!genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_335);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ }
stringBuffer.append(TEXT_336);
- if (useExtendedLabelProvider) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_337);
}
stringBuffer.append(TEXT_338);
if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_339);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DecoratingColumLabelProvider"));
stringBuffer.append(TEXT_340);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
- stringBuffer.append(TEXT_341);
}
+ stringBuffer.append(TEXT_341);
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_342);
- if (genModel.getDecoration() == GenDecoration.LIVE) {
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_343);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_344);
}
+ stringBuffer.append(TEXT_344);
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_345);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_346);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_347);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
+ }
stringBuffer.append(TEXT_348);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
+ if (genModel.getDecoration() == GenDecoration.LIVE) {
stringBuffer.append(TEXT_349);
- }
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_350);
- if (genModel.useClassOverrideAnnotation()) {
+ }
stringBuffer.append(TEXT_351);
}
stringBuffer.append(TEXT_352);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_353);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
stringBuffer.append(TEXT_354);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.edit.ui.provider.DiagnosticDecorator"));
stringBuffer.append(TEXT_355);
- } else if (genModel.getDecoration() == GenDecoration.LIVE) {
+ }
stringBuffer.append(TEXT_356);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_357);
}
stringBuffer.append(TEXT_358);
@@ -1245,99 +1258,98 @@ public class Editor
stringBuffer.append(TEXT_359);
}
stringBuffer.append(TEXT_360);
- stringBuffer.append(_ListOfAnything);
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_361);
- stringBuffer.append(genPackage.getEditorClassName());
+ } else if (genModel.getDecoration() == GenDecoration.LIVE) {
stringBuffer.append(TEXT_362);
- stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_363);
- if (genModel.useClassOverrideAnnotation()) {
- stringBuffer.append(TEXT_364);
}
+ stringBuffer.append(TEXT_364);
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_365);
- if (genPackage.isMultipleEditorPages()) {
+ }
stringBuffer.append(TEXT_366);
- } else {
+ stringBuffer.append(_ListOfAnything);
stringBuffer.append(TEXT_367);
- }
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_368);
- if (genModel.useGenerics()) {
+ stringBuffer.append(genPackage.getEditorClassName());
stringBuffer.append(TEXT_369);
- }
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_370);
- if (genPackage.isMultipleEditorPages()) {
+ }
stringBuffer.append(TEXT_371);
- stringBuffer.append(_ArrayListOfObject);
+ if (genPackage.isMultipleEditorPages()) {
stringBuffer.append(TEXT_372);
- stringBuffer.append(_ArrayListOfObject);
- stringBuffer.append(TEXT_373);
} else {
+ stringBuffer.append(TEXT_373);
+ }
stringBuffer.append(TEXT_374);
- stringBuffer.append(_ArrayListOfObject);
+ if (genModel.useGenerics()) {
stringBuffer.append(TEXT_375);
- stringBuffer.append(_ArrayListOfObject);
- stringBuffer.append(TEXT_376);
}
+ stringBuffer.append(TEXT_376);
+ if (genPackage.isMultipleEditorPages()) {
stringBuffer.append(TEXT_377);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(_ArrayListOfObject);
stringBuffer.append(TEXT_378);
- }
+ stringBuffer.append(_ArrayListOfObject);
stringBuffer.append(TEXT_379);
- if (genModel.useClassOverrideAnnotation()) {
+ } else {
stringBuffer.append(TEXT_380);
- }
+ stringBuffer.append(_ArrayListOfObject);
stringBuffer.append(TEXT_381);
- stringBuffer.append(_MapOfObjectToObject);
+ stringBuffer.append(_ArrayListOfObject);
stringBuffer.append(TEXT_382);
- stringBuffer.append(_HashMapOfObjectToObject);
+ }
stringBuffer.append(TEXT_383);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_384);
}
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF29_VALUE) {
stringBuffer.append(TEXT_385);
- }
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_386);
- stringBuffer.append(importedOperationClassName);
+ }
stringBuffer.append(TEXT_387);
- stringBuffer.append(importedOperationClassName);
+ stringBuffer.append(_MapOfObjectToObject);
stringBuffer.append(TEXT_388);
- if (!genModel.isRichClientPlatform() && genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(_HashMapOfObjectToObject);
stringBuffer.append(TEXT_389);
- }
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
stringBuffer.append(TEXT_390);
- stringBuffer.append(operationMethodName);
+ }
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF29_VALUE) {
stringBuffer.append(TEXT_391);
- if (genModel.useGenerics()) {
+ }
stringBuffer.append(TEXT_392);
- } else {
+ stringBuffer.append(importedOperationClassName);
stringBuffer.append(TEXT_393);
- }
+ stringBuffer.append(importedOperationClassName);
stringBuffer.append(TEXT_394);
- if (!genModel.useGenerics()) {
+ if (!genModel.isRichClientPlatform() && genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_395);
}
stringBuffer.append(TEXT_396);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
+ stringBuffer.append(operationMethodName);
stringBuffer.append(TEXT_397);
- } else {
+ if (genModel.useGenerics()) {
stringBuffer.append(TEXT_398);
- }
+ } else {
stringBuffer.append(TEXT_399);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
+ }
stringBuffer.append(TEXT_400);
- if (genModel.useClassOverrideAnnotation()) {
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_401);
}
stringBuffer.append(TEXT_402);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
stringBuffer.append(TEXT_403);
- }
+ } else {
stringBuffer.append(TEXT_404);
- if (genModel.isRichClientPlatform()) {
- if (genModel.isRichAjaxPlatform()) {
+ }
stringBuffer.append(TEXT_405);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.dialogs.ResourceDialog"));
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_406);
if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_407);
@@ -1347,103 +1359,126 @@ public class Editor
stringBuffer.append(TEXT_409);
}
stringBuffer.append(TEXT_410);
- stringBuffer.append("List" + (genModel.useGenerics() ? "<URI>" : ""));
+ if (genModel.isRichClientPlatform()) {
+ if (genModel.isRichAjaxPlatform()) {
stringBuffer.append(TEXT_411);
- stringBuffer.append(genModel.useGenerics() ? "": "(URI)");
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.dialogs.ResourceDialog"));
stringBuffer.append(TEXT_412);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput"));
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_413);
- } else {
+ }
stringBuffer.append(TEXT_414);
- if (!genModel.useGenerics()) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_415);
}
stringBuffer.append(TEXT_416);
- stringBuffer.append(genModel.getImportedName(genModel.getQualifiedEditorAdvisorClassName()));
+ stringBuffer.append("List" + (genModel.useGenerics() ? "<URI>" : ""));
stringBuffer.append(TEXT_417);
- stringBuffer.append(genModel.getImportedName("org.eclipse.swt.SWT"));
+ stringBuffer.append(genModel.useGenerics() ? "": "(URI)");
stringBuffer.append(TEXT_418);
stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput"));
stringBuffer.append(TEXT_419);
- }
} else {
stringBuffer.append(TEXT_420);
- }
- stringBuffer.append(TEXT_421);
if (!genModel.useGenerics()) {
- stringBuffer.append(TEXT_422);
+ stringBuffer.append(TEXT_421);
}
+ stringBuffer.append(TEXT_422);
+ stringBuffer.append(genModel.getImportedName(genModel.getQualifiedEditorAdvisorClassName()));
stringBuffer.append(TEXT_423);
- stringBuffer.append(genModel.getImportedName("org.eclipse.core.runtime.NullProgressMonitor"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.swt.SWT"));
stringBuffer.append(TEXT_424);
- if (!genModel.isRichClientPlatform()) {
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput"));
stringBuffer.append(TEXT_425);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
+ }
+ } else {
stringBuffer.append(TEXT_426);
- stringBuffer.append(_ListOfAnything);
+ }
stringBuffer.append(TEXT_427);
- } else {
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_428);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_429);
}
+ stringBuffer.append(TEXT_429);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.core.runtime.NullProgressMonitor"));
stringBuffer.append(TEXT_430);
- }
+ if (!genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_431);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
stringBuffer.append(TEXT_432);
- }
+ stringBuffer.append(_ListOfAnything);
stringBuffer.append(TEXT_433);
- if (!genModel.isRichClientPlatform()) {
+ } else {
stringBuffer.append(TEXT_434);
- }
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_435);
- if (genModel.useClassOverrideAnnotation()) {
+ }
stringBuffer.append(TEXT_436);
}
stringBuffer.append(TEXT_437);
- if (genPackage.isMultipleEditorPages()) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_438);
- } else {
- stringBuffer.append(TEXT_439);
}
+ stringBuffer.append(TEXT_439);
+ if (!genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_440);
- if (genModel.useGenerics()) {
+ }
stringBuffer.append(TEXT_441);
- } else {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_442);
}
stringBuffer.append(TEXT_443);
- if (!genModel.useGenerics()) {
+ if (genPackage.isMultipleEditorPages()) {
stringBuffer.append(TEXT_444);
- }
+ } else {
stringBuffer.append(TEXT_445);
- stringBuffer.append(_CollectionOfAnything);
+ }
stringBuffer.append(TEXT_446);
- stringBuffer.append(genModel.getNonNLS());
+ if (genModel.useGenerics()) {
stringBuffer.append(TEXT_447);
- stringBuffer.append(genModel.getNonNLS());
+ } else {
stringBuffer.append(TEXT_448);
- stringBuffer.append(genModel.getNonNLS());
+ }
stringBuffer.append(TEXT_449);
- stringBuffer.append(genModel.getNonNLS());
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_450);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
+ }
stringBuffer.append(TEXT_451);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
+ stringBuffer.append(_CollectionOfAnything);
stringBuffer.append(TEXT_452);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_453);
- }
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_454);
- if (!genModel.isRichClientPlatform()) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_455);
- }
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_456);
- stringBuffer.append(genPackage.isMultipleEditorPages());
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_457);
- genModel.emitSortedImports();
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_458);
+ if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(TEXT_459);
+ }
+ stringBuffer.append(TEXT_460);
+ if (!genModel.isRichClientPlatform()) {
+ stringBuffer.append(TEXT_461);
+ }
+ stringBuffer.append(TEXT_462);
+ if (genModel.useGenerics()) {
+ stringBuffer.append(TEXT_463);
+ } else {
+ stringBuffer.append(TEXT_464);
+ }
+ stringBuffer.append(TEXT_465);
+ if (!genModel.useGenerics()) {
+ stringBuffer.append(TEXT_466);
+ }
+ stringBuffer.append(TEXT_467);
+ stringBuffer.append(genPackage.isMultipleEditorPages());
+ stringBuffer.append(TEXT_468);
+ genModel.emitSortedImports();
+ stringBuffer.append(TEXT_469);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet b/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
index 70d80f8b4..8ca5e1107 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
+++ b/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
@@ -30,6 +30,8 @@
<%String _AdapterFactoryLabelProvider = "AdapterFactoryLabelProvider" + (genModel.isFontProviders() && genModel.isColorProviders() ? ".FontAndColorProvider" : genModel.isFontProviders() ? ".FontProvider" : genModel.isColorProviders() ? ".ColorProvider" : "");%>
<%String _ArrayListOfString = "ArrayList" + (genModel.useGenerics() ? "<String>" : "");%>
<%String _ListOfString = "List" + (genModel.useGenerics() ? "<String>" : "");%>
+<%String _ListOfPropertySheetPage = "List" + (genModel.useGenerics() ? "<PropertySheetPage>" : "");%>
+<%String _ArrayListOfPropertySheetPage = "ArrayList" + (genModel.useGenerics() ? "<PropertySheetPage>" : "");%>
<%@ include file="../Header.javajetinc"%>
package <%=genPackage.getPresentationPackageName()%>;
@@ -332,7 +334,7 @@ public class <%=genPackage.getEditorClassName()%>
* <!-- end-user-doc -->
* @generated
*/
- protected PropertySheetPage propertySheetPage;
+ protected <%=_ListOfPropertySheetPage%> propertySheetPages = new <%=_ArrayListOfPropertySheetPage%>();
/**
* This is the viewer that shadows the selection in the content outline.
@@ -460,7 +462,7 @@ public class <%=genPackage.getEditorClassName()%>
}
else if (p instanceof PropertySheet)
{
- if (((PropertySheet)p).getCurrentPage() == propertySheetPage)
+ if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage()))
{
getActionBarContributor().setActiveEditor(<%=genPackage.getEditorClassName()%>.this);
handleActivate();
@@ -988,9 +990,17 @@ public class <%=genPackage.getEditorClassName()%>
{
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
- if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed())
+ for (Iterator<%if (genModel.useGenerics()) {%><PropertySheetPage><%}%> i = propertySheetPages.iterator(); i.hasNext(); )
{
- propertySheetPage.refresh();
+ PropertySheetPage propertySheetPage = <%if (!genModel.useGenerics()) {%>(PropertySheetPage)<%}%>i.next();
+ if (propertySheetPage.getControl().isDisposed())
+ {
+ i.remove();
+ }
+ else
+ {
+ propertySheetPage.refresh();
+ }
}
}
});
@@ -1842,31 +1852,29 @@ public class <%=genPackage.getEditorClassName()%>
*/
public IPropertySheetPage getPropertySheetPage()
{
- if (propertySheetPage == null)
- {
- propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain<%if (genModel.getDecoration() == GenDecoration.MANUAL) {%>, ExtendedPropertySheetPage.Decoration.MANUAL<%} else if (genModel.getDecoration() == GenDecoration.LIVE) {%>, ExtendedPropertySheetPage.Decoration.LIVE, <%=genPackage.getImportedEditorPluginClassName()%>.getPlugin().getDialogSettings()<%}%>)
- {
+ PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain<%if (genModel.getDecoration() == GenDecoration.MANUAL) {%>, ExtendedPropertySheetPage.Decoration.MANUAL<%} else if (genModel.getDecoration() == GenDecoration.LIVE) {%>, ExtendedPropertySheetPage.Decoration.LIVE, <%=genPackage.getImportedEditorPluginClassName()%>.getPlugin().getDialogSettings()<%}%>)
+ {
<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
+ @Override
<%}%>
- public void setSelectionToViewer(<%=_ListOfAnything%> selection)
- {
- <%=genPackage.getEditorClassName()%>.this.setSelectionToViewer(selection);
- <%=genPackage.getEditorClassName()%>.this.setFocus();
- }
+ public void setSelectionToViewer(<%=_ListOfAnything%> selection)
+ {
+ <%=genPackage.getEditorClassName()%>.this.setSelectionToViewer(selection);
+ <%=genPackage.getEditorClassName()%>.this.setFocus();
+ }
<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
+ @Override
<%}%>
- public void setActionBars(IActionBars actionBars)
- {
- super.setActionBars(actionBars);
- getActionBarContributor().shareGlobalActions(this, actionBars);
- }
- };
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- }
+ public void setActionBars(IActionBars actionBars)
+ {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -2435,8 +2443,15 @@ public class <%=genPackage.getEditorClassName()%>
getActionBarContributor().setActiveEditor(null);
}
- if (propertySheetPage != null)
+<%if (genModel.useGenerics()) {%>
+ for (PropertySheetPage propertySheetPage : propertySheetPages)
+<%} else {%>
+ for (Iterator i = propertySheetPages.iterator(); i.hasNext(); )
+<%}%>
{
+<%if (!genModel.useGenerics()) {%>
+ PropertySheetPage propertySheetPage = (PropertySheetPage)i.next();
+<%}%>
propertySheetPage.dispose();
}
diff --git a/plugins/org.eclipse.emf.ecore.editor/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java b/plugins/org.eclipse.emf.ecore.editor/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java
index 0222dde61..674fed67f 100644
--- a/plugins/org.eclipse.emf.ecore.editor/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java
+++ b/plugins/org.eclipse.emf.ecore.editor/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java
@@ -272,7 +272,7 @@ public class EcoreEditor
* <!-- end-user-doc -->
* @generated
*/
- protected PropertySheetPage propertySheetPage;
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
/**
* This is the viewer that shadows the selection in the content outline.
@@ -346,7 +346,7 @@ public class EcoreEditor
}
else if (p instanceof PropertySheet)
{
- if (((PropertySheet)p).getCurrentPage() == propertySheetPage)
+ if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage()))
{
getActionBarContributor().setActiveEditor(EcoreEditor.this);
handleActivate();
@@ -861,9 +861,17 @@ public class EcoreEditor
{
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
- if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed())
+ for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); )
{
- propertySheetPage.refresh();
+ PropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed())
+ {
+ i.remove();
+ }
+ else
+ {
+ propertySheetPage.refresh();
+ }
}
}
});
@@ -1555,27 +1563,25 @@ public class EcoreEditor
*/
public IPropertySheetPage getPropertySheetPage()
{
- if (propertySheetPage == null)
- {
- propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain, ExtendedPropertySheetPage.Decoration.LIVE, EcoreEditorPlugin.getPlugin().getDialogSettings())
+ PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain, ExtendedPropertySheetPage.Decoration.LIVE, EcoreEditorPlugin.getPlugin().getDialogSettings())
+ {
+ @Override
+ public void setSelectionToViewer(List<?> selection)
{
- @Override
- public void setSelectionToViewer(List<?> selection)
- {
- EcoreEditor.this.setSelectionToViewer(selection);
- EcoreEditor.this.setFocus();
- }
+ EcoreEditor.this.setSelectionToViewer(selection);
+ EcoreEditor.this.setFocus();
+ }
- @Override
- public void setActionBars(IActionBars actionBars)
- {
- super.setActionBars(actionBars);
- getActionBarContributor().shareGlobalActions(this, actionBars);
- }
- };
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- }
+ @Override
+ public void setActionBars(IActionBars actionBars)
+ {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -1698,7 +1704,7 @@ public class EcoreEditor
/**
* This returns whether something has been persisted to the URI of the specified resource.
- * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -2019,7 +2025,7 @@ public class EcoreEditor
getActionBarContributor().setActiveEditor(null);
}
- if (propertySheetPage != null)
+ for (PropertySheetPage propertySheetPage : propertySheetPages)
{
propertySheetPage.dispose();
}
diff --git a/plugins/org.eclipse.emf.ecore.xcore.ui/src/org/eclipse/emf/ecore/xcore/ui/editor/XcoreEditor.java b/plugins/org.eclipse.emf.ecore.xcore.ui/src/org/eclipse/emf/ecore/xcore/ui/editor/XcoreEditor.java
index 51bfaedb7..ef7a88166 100644
--- a/plugins/org.eclipse.emf.ecore.xcore.ui/src/org/eclipse/emf/ecore/xcore/ui/editor/XcoreEditor.java
+++ b/plugins/org.eclipse.emf.ecore.xcore.ui/src/org/eclipse/emf/ecore/xcore/ui/editor/XcoreEditor.java
@@ -9,6 +9,7 @@ package org.eclipse.emf.ecore.xcore.ui.editor;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -99,7 +100,7 @@ public class XcoreEditor extends XtextEditor
@Inject XcoreGenModelInitializer genModelInitializer;
- protected PropertySheetPage propertySheetPage;
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
protected ComposedAdapterFactory adapterFactory;
@@ -119,538 +120,521 @@ public class XcoreEditor extends XtextEditor
public IPropertySheetPage getPropertySheetPage()
{
- if (propertySheetPage == null)
- {
- // Create an adapter factory that uses registered item provider adapter factories, but specializes the one for the GenModel
- //
- adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- final AdapterFactoryItemDelegator itemDelegator = new AdapterFactoryItemDelegator(adapterFactory);
- adapterFactory.addAdapterFactory
- (new GenModelItemProviderAdapterFactory()
+ // Create an adapter factory that uses registered item provider adapter factories, but specializes the one for the GenModel
+ //
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ final AdapterFactoryItemDelegator itemDelegator = new AdapterFactoryItemDelegator(adapterFactory);
+ adapterFactory.addAdapterFactory
+ (new GenModelItemProviderAdapterFactory()
+ {
+ @Override
+ public Adapter createGenModelAdapter()
{
- @Override
- public Adapter createGenModelAdapter()
- {
- // Create a new adapter each time.
- //
- return
- new GenModelItemProvider(this)
+ // Create a new adapter each time.
+ //
+ return
+ new GenModelItemProvider(this)
+ {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
{
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ if (itemPropertyDescriptors == null)
{
- if (itemPropertyDescriptors == null)
- {
- super.getPropertyDescriptors(object);
+ super.getPropertyDescriptors(object);
- // Merge in the decorated property descriptors for the one GenPackage in the model.
- //
- GenModel genModel = (GenModel)object;
- EList<GenPackage> genPackages = genModel.getGenPackages();
- if (!genPackages.isEmpty())
+ // Merge in the decorated property descriptors for the one GenPackage in the model.
+ //
+ GenModel genModel = (GenModel)object;
+ EList<GenPackage> genPackages = genModel.getGenPackages();
+ if (!genPackages.isEmpty())
+ {
+ GenPackage genPackage = genPackages.get(0);
+ List<IItemPropertyDescriptor> genPackagePropertyDescriptors = itemDelegator.getPropertyDescriptors(genPackage);
+ for (IItemPropertyDescriptor genPackagePropertyDescriptor : genPackagePropertyDescriptors)
{
- GenPackage genPackage = genPackages.get(0);
- List<IItemPropertyDescriptor> genPackagePropertyDescriptors = itemDelegator.getPropertyDescriptors(genPackage);
- for (IItemPropertyDescriptor genPackagePropertyDescriptor : genPackagePropertyDescriptors)
- {
- itemPropertyDescriptors.add(new ItemPropertyDescriptorDecorator(genPackage, genPackagePropertyDescriptor));
- }
+ itemPropertyDescriptors.add(new ItemPropertyDescriptorDecorator(genPackage, genPackagePropertyDescriptor));
}
}
- return itemPropertyDescriptors;
}
- };
- }
- });
-
- // Cache the editor's document and resource set.
- //
- final IXtextDocument document = getDocument();
- final ResourceSet resourceSet =
- document.readOnly
- (new IUnitOfWork<ResourceSet, XtextResource>()
+ return itemPropertyDescriptors;
+ }
+ };
+ }
+ });
+
+ // Cache the editor's document and resource set.
+ //
+ final IXtextDocument document = getDocument();
+ final ResourceSet resourceSet =
+ document.readOnly
+ (new IUnitOfWork<ResourceSet, XtextResource>()
+ {
+ public ResourceSet exec(final XtextResource xtextResource) throws Exception
{
- public ResourceSet exec(final XtextResource xtextResource) throws Exception
- {
- return xtextResource.getResourceSet();
- }
- });
-
- // Create a specialized command stack.
- //
- BasicCommandStack commandStack =
- new BasicCommandStack()
+ return xtextResource.getResourceSet();
+ }
+ });
+
+ // Create a specialized command stack.
+ //
+ BasicCommandStack commandStack =
+ new BasicCommandStack()
+ {
+ protected boolean isDefault(final GenModel genModel, EObject eObject, EStructuralFeature eStructuralFeature)
{
- protected boolean isDefault(final GenModel genModel, EObject eObject, EStructuralFeature eStructuralFeature)
+ // Create a freshly initialized GenModel for the original GenModel's EPackage.
+ //
+ Resource fakeResource = new ResourceImpl(genModel.eResource().getURI());
+ final GenModel clonedGenModel = GenModelFactory.eINSTANCE.createGenModel();
+ EList<GenPackage> genPackages = genModel.getGenPackages();
+ if (!genPackages.isEmpty())
{
- // Create a freshly initialized GenModel for the original GenModel's EPackage.
- //
- Resource fakeResource = new ResourceImpl(genModel.eResource().getURI());
- final GenModel clonedGenModel = GenModelFactory.eINSTANCE.createGenModel();
- EList<GenPackage> genPackages = genModel.getGenPackages();
- if (!genPackages.isEmpty())
- {
- clonedGenModel.initialize(Collections.singleton(genPackages.get(0).getEcorePackage()));
- }
- genModelInitializer.initialize(clonedGenModel, false);
- fakeResource.getContents().add(clonedGenModel);
+ clonedGenModel.initialize(Collections.singleton(genPackages.get(0).getEcorePackage()));
+ }
+ genModelInitializer.initialize(clonedGenModel, false);
+ fakeResource.getContents().add(clonedGenModel);
- // Traverse the EObject to find its clone in the cloned GenModel.
- //
- EObject clonedEObject =
- new Object()
+ // Traverse the EObject to find its clone in the cloned GenModel.
+ //
+ EObject clonedEObject =
+ new Object()
+ {
+ EObject traverse(EObject eObject)
{
- EObject traverse(EObject eObject)
+ EObject eContainer = eObject.eContainer();
+ if (eContainer == null)
{
- EObject eContainer = eObject.eContainer();
- if (eContainer == null)
+ return clonedGenModel;
+ }
+ else
+ {
+ EReference eContainmentFeature = eObject.eContainmentFeature();
+ EObject clonedEObject = traverse(eContainer);
+ Object value = clonedEObject.eGet(eContainmentFeature);
+ if (eContainmentFeature.isMany())
{
- return clonedGenModel;
+ @SuppressWarnings("unchecked")
+ List<EObject> values = (List<EObject>)value;
+ List<?> originalValues = (List<?>)eContainer.eGet(eContainmentFeature);
+ return values.get(originalValues.indexOf(eObject));
}
else
{
- EReference eContainmentFeature = eObject.eContainmentFeature();
- EObject clonedEObject = traverse(eContainer);
- Object value = clonedEObject.eGet(eContainmentFeature);
- if (eContainmentFeature.isMany())
- {
- @SuppressWarnings("unchecked")
- List<EObject> values = (List<EObject>)value;
- List<?> originalValues = (List<?>)eContainer.eGet(eContainmentFeature);
- return values.get(originalValues.indexOf(eObject));
- }
- else
- {
- return (EObject)value;
- }
+ return (EObject)value;
}
}
- }.traverse(eObject);
-
- // Test whether the feature's value is the same as the default.
- //
- Object newValue = eObject.eGet(eStructuralFeature);
- Object defaultValue = clonedEObject.eGet(eStructuralFeature);
- return
- newValue == null ?
- defaultValue == null :
- newValue instanceof GenFeature && defaultValue instanceof GenFeature ?
- ((GenFeature)newValue).getEcoreFeature() == ((GenFeature)defaultValue).getEcoreFeature() :
- newValue.equals(defaultValue);
- }
+ }
+ }.traverse(eObject);
+
+ // Test whether the feature's value is the same as the default.
+ //
+ Object newValue = eObject.eGet(eStructuralFeature);
+ Object defaultValue = clonedEObject.eGet(eStructuralFeature);
+ return
+ newValue == null ?
+ defaultValue == null :
+ newValue instanceof GenFeature && defaultValue instanceof GenFeature ?
+ ((GenFeature)newValue).getEcoreFeature() == ((GenFeature)defaultValue).getEcoreFeature() :
+ newValue.equals(defaultValue);
+ }
- protected String getValue(EObject eObject, EStructuralFeature eStructuralFeature)
- {
- EClassifier eType = eStructuralFeature.getEType();
- Object value = eObject.eGet(eStructuralFeature);
- @SuppressWarnings("unchecked")
- String literal =
- eType instanceof EDataType ?
- eStructuralFeature.isMany() ?
- XMLTypeFactory.eINSTANCE.convertENTITIESBase((List<String>)value) :
- EcoreUtil.convertToString((EDataType)eType, value) :
- ((GenFeature)value).getName();
- return valueConverterService.toString(literal, "STRING");
- }
+ protected String getValue(EObject eObject, EStructuralFeature eStructuralFeature)
+ {
+ EClassifier eType = eStructuralFeature.getEType();
+ Object value = eObject.eGet(eStructuralFeature);
+ @SuppressWarnings("unchecked")
+ String literal =
+ eType instanceof EDataType ?
+ eStructuralFeature.isMany() ?
+ XMLTypeFactory.eINSTANCE.convertENTITIESBase((List<String>)value) :
+ EcoreUtil.convertToString((EDataType)eType, value) :
+ ((GenFeature)value).getName();
+ return valueConverterService.toString(literal, "STRING");
+ }
- @Override
- public void execute(Command command)
- {
- // Before executing the command, add a content adapter to the GenModel to be notified of whatever feature changes.
- //
- final Resource resource = resourceSet.getResources().get(0);
- final GenModel genModel = (GenModel)EcoreUtil.getObjectByType(resource.getContents(), GenModelPackage.Literals.GEN_MODEL);
- final List<Notification> notifications = new ArrayList<Notification>();
- final EContentAdapter eContentAdatper =
- new EContentAdapter()
+ @Override
+ public void execute(Command command)
+ {
+ // Before executing the command, add a content adapter to the GenModel to be notified of whatever feature changes.
+ //
+ final Resource resource = resourceSet.getResources().get(0);
+ final GenModel genModel = (GenModel)EcoreUtil.getObjectByType(resource.getContents(), GenModelPackage.Literals.GEN_MODEL);
+ final List<Notification> notifications = new ArrayList<Notification>();
+ final EContentAdapter eContentAdatper =
+ new EContentAdapter()
+ {
+ @Override
+ public void notifyChanged(final Notification notification)
{
- @Override
- public void notifyChanged(final Notification notification)
+ super.notifyChanged(notification);
+ int eventType = notification.getEventType();
+ if (eventType == Notification.REMOVING_ADAPTER)
{
- super.notifyChanged(notification);
- int eventType = notification.getEventType();
- if (eventType == Notification.REMOVING_ADAPTER)
+ // If we are removing the adapters from the GenModel, because it's unloaded when a new GenModel is inferred...
+ //
+ if (notification.getNotifier() instanceof GenModel)
{
- // If we are removing the adapters from the GenModel, because it's unloaded when a new GenModel is inferred...
+ // Defer producing a new selection changed event to update the properties view for the the new inferred selection.
//
- if (notification.getNotifier() instanceof GenModel)
- {
- // Defer producing a new selection changed event to update the properties view for the the new inferred selection.
- //
- getEditorSite().getShell().getDisplay().asyncExec
- (new Runnable()
+ getEditorSite().getShell().getDisplay().asyncExec
+ (new Runnable()
+ {
+ public void run()
{
- public void run()
- {
- document.readOnly
- (new IUnitOfWork.Void<XtextResource>()
+ document.readOnly
+ (new IUnitOfWork.Void<XtextResource>()
+ {
+ @Override
+ public void process(final XtextResource xtextResource) throws Exception
{
- @Override
- public void process(final XtextResource xtextResource) throws Exception
+ ISelection selection = getSourceViewer().getSelectionProvider().getSelection();
+ for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); )
{
- propertySheetPage.selectionChanged(XcoreEditor.this, getSourceViewer().getSelectionProvider().getSelection());
+ PropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed())
+ {
+ i.remove();
+ }
+ else
+ {
+ propertySheetPage.selectionChanged(XcoreEditor.this, selection);
+ }
}
- });
- }
- });
- }
- }
- else if (!notification.isTouch() && notification.getNotifier() instanceof EObject)
- {
- // Record the notifications.
- //
- notifications.add(0, notification);
+ }
+ });
+ }
+ });
}
}
- };
- genModel.eAdapters().add(eContentAdatper);
+ else if (!notification.isTouch() && notification.getNotifier() instanceof EObject)
+ {
+ // Record the notifications.
+ //
+ notifications.add(0, notification);
+ }
+ }
+ };
+ genModel.eAdapters().add(eContentAdatper);
- // Execute the command, recording notifications so they can be processed after the command is complete.
- //
- super.execute(command);
-
- // Process the deferred notifications.
+ // Execute the command, recording notifications so they can be processed after the command is complete.
+ //
+ super.execute(command);
+
+ // Process the deferred notifications.
+ //
+ if (!notifications.isEmpty())
+ {
+ final Notification notification = notifications.get(0);
+
+ // For the feature of the object that's changed, process the new contents of the feature.
//
- if (!notifications.isEmpty())
- {
- final Notification notification = notifications.get(0);
-
- // For the feature of the object that's changed, process the new contents of the feature.
- //
- document.modify
- (new IUnitOfWork.Void<XtextResource>()
+ document.modify
+ (new IUnitOfWork.Void<XtextResource>()
+ {
+ @Override
+ public void process(XtextResource state) throws Exception
{
- @Override
- public void process(XtextResource state) throws Exception
+ // Determine the object and feature that are changed.
+ //
+ EObject eObject = (EObject)notification.getNotifier();
+ EStructuralFeature eStructuralFeature = (EStructuralFeature)notification.getFeature();
+ String name = eStructuralFeature.getName();
+
+ // Determine the affected Xcore element.
+ //
+ ToXcoreMapping xcoreMapping = mapper.getToXcoreMapping(eObject);
+ XNamedElement xNamedElement = xcoreMapping.getXcoreElement();
+ if (xNamedElement == null && eObject instanceof GenModel)
{
- // Determine the object and feature that are changed.
+ xNamedElement = (XPackage)resource.getContents().get(0);
+ }
+ if (xNamedElement != null)
+ {
+ // Determine the nodes affected for the element, i.e.,
+ // the node for the element as a whole,
+ // the node for the annotation,
+ // the node for the detail entry,
+ // and the node for the value in the detail entry.
//
- EObject eObject = (EObject)notification.getNotifier();
- EStructuralFeature eStructuralFeature = (EStructuralFeature)notification.getFeature();
- String name = eStructuralFeature.getName();
+ ICompositeNode elementNode = NodeModelUtils.getNode(xNamedElement);
+ ICompositeNode annotationNode = null;
+ ICompositeNode detailNode = null;
+ List<INode> valueNodes = null;
- // Determine the affected Xcore element.
+ // Determine if there is already an annotation for the GenModel's annotation URI.
//
- ToXcoreMapping xcoreMapping = mapper.getToXcoreMapping(eObject);
- XNamedElement xNamedElement = xcoreMapping.getXcoreElement();
- if (xNamedElement == null && eObject instanceof GenModel)
- {
- xNamedElement = (XPackage)resource.getContents().get(0);
- }
- if (xNamedElement != null)
+ XAnnotation xAnnotation = xNamedElement.getAnnotation(GenModelPackage.eNS_URI);
+ if (xAnnotation != null)
{
- // Determine the nodes affected for the element, i.e.,
- // the node for the element as a whole,
- // the node for the annotation,
- // the node for the detail entry,
- // and the node for the value in the detail entry.
+ // If there is, get the node for that.
//
- ICompositeNode elementNode = NodeModelUtils.getNode(xNamedElement);
- ICompositeNode annotationNode = null;
- ICompositeNode detailNode = null;
- List<INode> valueNodes = null;
+ annotationNode = NodeModelUtils.getNode(xAnnotation);
- // Determine if there is already an annotation for the GenModel's annotation URI.
+ // Determine if there is a detail entry for the affected feature.
+ //
+ for (Map.Entry<String, String> detail : xAnnotation.getDetails())
+ {
+ if (name.equals(detail.getKey()))
+ {
+ // If there is a matching key, determine the overall node for it and the node for the value.
+ //
+ detailNode = NodeModelUtils.findActualNodeFor((EObject)detail);
+ valueNodes = NodeModelUtils.findNodesForFeature((EObject)detail, XcorePackage.Literals.XSTRING_TO_STRING_MAP_ENTRY__VALUE);
+ break;
+ }
+ }
+ }
+ // If we found a node for the element...
+ //
+ if (elementNode != null)
+ {
+ // If there doesn't yet exist an annotation node.
//
- XAnnotation xAnnotation = xNamedElement.getAnnotation(GenModelPackage.eNS_URI);
- if (xAnnotation != null)
+ if (annotationNode == null)
{
- // If there is, get the node for that.
+ // Insert a new annotation with the key/value mapping on a new line before the element node.
//
- annotationNode = NodeModelUtils.getNode(xAnnotation);
+ int offset = elementNode.getOffset();
- // Determine if there is a detail entry for the affected feature.
+ // Match the indentation of the element.
//
- for (Map.Entry<String, String> detail : xAnnotation.getDetails())
+ int line = document.getLineOfOffset(offset);
+ String lineDelimiter = document.getLineDelimiter(line);
+ int lineOffset = document.getLineOffset(line);
+ String indentation = document.get(lineOffset, offset - lineOffset);
+ int length = indentation.length();
+ StringBuilder newIndentation = new StringBuilder(length);
+ for (int i = 0; i < length; ++i)
{
- if (name.equals(detail.getKey()))
- {
- // If there is a matching key, determine the overall node for it and the node for the value.
- //
- detailNode = NodeModelUtils.findActualNodeFor((EObject)detail);
- valueNodes = NodeModelUtils.findNodesForFeature((EObject)detail, XcorePackage.Literals.XSTRING_TO_STRING_MAP_ENTRY__VALUE);
- break;
- }
+ int codePoint = indentation.codePointAt(i);
+ newIndentation.appendCodePoint(Character.isSpaceChar(codePoint) ? codePoint : ' ');
}
+
+ document.replace(lineOffset, 0, newIndentation + "@GenModel(" + name + "=" + getValue(eObject, eStructuralFeature) + ")" + lineDelimiter);
}
- // If we found a node for the element...
+ // If there is a node for the old value...
//
- if (elementNode != null)
+ else if (valueNodes != null)
{
- // If there doesn't yet exist an annotation node.
+ // If the feature isn't set to the default, and there is a node for the detail entry, we want to remove the node...
//
- if (annotationNode == null)
+ if (detailNode != null && isDefault(genModel, eObject, eStructuralFeature))
{
- // Insert a new annotation with the key/value mapping on a new line before the element node.
+ // Cache the grammar rules we'll need to match.
//
- int offset = elementNode.getOffset();
-
- // Match the indentation of the element.
+ Keyword comma = xcoreGrammarAccess.getXAnnotationAccess().getCommaKeyword_2_2_0();
+ Keyword leftParenthesis = xcoreGrammarAccess.getXAnnotationAccess().getLeftParenthesisKeyword_2_0();
+ Keyword rightParenthesis = xcoreGrammarAccess.getXAnnotationAccess().getRightParenthesisKeyword_2_3();
+
+ // Compute the locations of the surrounding mark-up, i.e.,
+ // the left parenthesis of the annotation,
+ // the comma before the detail entry,
+ // the start of the next entry,
+ // and the right parenthesis.
//
- int line = document.getLineOfOffset(offset);
- String lineDelimiter = document.getLineDelimiter(line);
- int lineOffset = document.getLineOffset(line);
- String indentation = document.get(lineOffset, offset - lineOffset);
- int length = indentation.length();
- StringBuilder newIndentation = new StringBuilder(length);
- for (int i = 0; i < length; ++i)
- {
- int codePoint = indentation.codePointAt(i);
- newIndentation.appendCodePoint(Character.isSpaceChar(codePoint) ? codePoint : ' ');
- }
+ int leftParenthesisOffset = -1;
+ int commaOffset = -1;
+ int nextDetailNodeOffset = -1;
+ int rightParenthesisOffset = -1;
- document.replace(lineOffset, 0, newIndentation + "@GenModel(" + name + "=" + getValue(eObject, eStructuralFeature) + ")" + lineDelimiter);
- }
- // If there is a node for the old value...
- //
- else if (valueNodes != null)
- {
- // If the feature isn't set to the default, and there is a node for the detail entry, we want to remove the node...
+ // This is set to true once we've iterated past the detail entry.
//
- if (detailNode != null && isDefault(genModel, eObject, eStructuralFeature))
+ boolean matched = false;
+ for (INode child : detailNode.getParent().getChildren())
{
- // Cache the grammar rules we'll need to match.
- //
- Keyword comma = xcoreGrammarAccess.getXAnnotationAccess().getCommaKeyword_2_2_0();
- Keyword leftParenthesis = xcoreGrammarAccess.getXAnnotationAccess().getLeftParenthesisKeyword_2_0();
- Keyword rightParenthesis = xcoreGrammarAccess.getXAnnotationAccess().getRightParenthesisKeyword_2_3();
-
- // Compute the locations of the surrounding mark-up, i.e.,
- // the left parenthesis of the annotation,
- // the comma before the detail entry,
- // the start of the next entry,
- // and the right parenthesis.
- //
- int leftParenthesisOffset = -1;
- int commaOffset = -1;
- int nextDetailNodeOffset = -1;
- int rightParenthesisOffset = -1;
-
- // This is set to true once we've iterated past the detail entry.
- //
- boolean matched = false;
- for (INode child : detailNode.getParent().getChildren())
+ EObject grammarElement = child.getGrammarElement();
+ if (matched)
{
- EObject grammarElement = child.getGrammarElement();
- if (matched)
- {
- if (grammarElement == rightParenthesis)
- {
- rightParenthesisOffset = child.getOffset();
- break;
- }
- else if (NodeModelUtils.findActualSemanticObjectFor(child) instanceof Map.Entry)
- {
- nextDetailNodeOffset = child.getOffset();
- break;
- }
- }
- else if (child == detailNode)
+ if (grammarElement == rightParenthesis)
{
- matched = true;
+ rightParenthesisOffset = child.getOffset();
+ break;
}
- else if (grammarElement == leftParenthesis)
+ else if (NodeModelUtils.findActualSemanticObjectFor(child) instanceof Map.Entry)
{
- leftParenthesisOffset = child.getOffset();
- }
- else if (grammarElement == comma)
- {
- commaOffset = child.getOffset();
+ nextDetailNodeOffset = child.getOffset();
+ break;
}
}
+ else if (child == detailNode)
+ {
+ matched = true;
+ }
+ else if (grammarElement == leftParenthesis)
+ {
+ leftParenthesisOffset = child.getOffset();
+ }
+ else if (grammarElement == comma)
+ {
+ commaOffset = child.getOffset();
+ }
+ }
- if (commaOffset != -1)
+ if (commaOffset != -1)
+ {
+ if (rightParenthesisOffset != -1)
{
- if (rightParenthesisOffset != -1)
- {
- // @GenModel(a="x", b="y", c="z")
- // ^ ^
- //
- document.replace(commaOffset, rightParenthesisOffset - commaOffset, "");
- }
- else // if (nextDetailNodeOffset != -1)
- {
- // @GenModel(a="x", b="y", c="z")
- // ^ ^
- //
- document.replace(commaOffset + 1, nextDetailNodeOffset - commaOffset - 1, " ");
- }
+ // @GenModel(a="x", b="y", c="z")
+ // ^ ^
+ //
+ document.replace(commaOffset, rightParenthesisOffset - commaOffset, "");
}
- else // if (leftParenthesisOffset != -1)
+ else // if (nextDetailNodeOffset != -1)
{
- if (rightParenthesisOffset != -1)
- {
- // @GenModel(a="x")
- // ^ ^
- //
- // document.replace(leftParenthesisOffset, rightParenthesisOffset - leftParenthesisOffset + 1, "");
- XcoreQuickfixProvider.RemovalRegion removalRegion = new XcoreQuickfixProvider.RemovalRegion(document, xAnnotation);
- document.replace(removalRegion.getDeleteBegin(), removalRegion.getDeleteEnd() - removalRegion.getDeleteBegin(), "");
- }
- else // if (nextDetailNodeOffset != -1)
- {
- // @GenModel(a="x", b="y", c="z")
- // ^ ^
- //
- document.replace(leftParenthesisOffset + 1, nextDetailNodeOffset - leftParenthesisOffset - 1, "");
- }
+ // @GenModel(a="x", b="y", c="z")
+ // ^ ^
+ //
+ document.replace(commaOffset + 1, nextDetailNodeOffset - commaOffset - 1, " ");
}
}
- else
+ else // if (leftParenthesisOffset != -1)
{
- // Replace the old value with the new value.
- // @GenModel(a="x")
- // ^ ^
- //
- INode valueNode = valueNodes.get(0);
- document.replace(valueNode.getOffset(), valueNode.getLength(), getValue(eObject, eStructuralFeature));
+ if (rightParenthesisOffset != -1)
+ {
+ // @GenModel(a="x")
+ // ^ ^
+ //
+ // document.replace(leftParenthesisOffset, rightParenthesisOffset - leftParenthesisOffset + 1, "");
+ XcoreQuickfixProvider.RemovalRegion removalRegion = new XcoreQuickfixProvider.RemovalRegion(document, xAnnotation);
+ document.replace(removalRegion.getDeleteBegin(), removalRegion.getDeleteEnd() - removalRegion.getDeleteBegin(), "");
+ }
+ else // if (nextDetailNodeOffset != -1)
+ {
+ // @GenModel(a="x", b="y", c="z")
+ // ^ ^
+ //
+ document.replace(leftParenthesisOffset + 1, nextDetailNodeOffset - leftParenthesisOffset - 1, "");
+ }
}
}
- // If this is the first detail entry...
- //
- else if (xAnnotation != null && xAnnotation.getDetails().isEmpty())
+ else
{
- // Add the key/value mapping with new parentheses.
- // @GenModel
- // ^
+ // Replace the old value with the new value.
+ // @GenModel(a="x")
+ // ^ ^
//
- int offset = annotationNode.getOffset() + annotationNode.getLength();
- document.replace(offset, 0, "(" + name + "=" + getValue(eObject, eStructuralFeature) + ")");
+ INode valueNode = valueNodes.get(0);
+ document.replace(valueNode.getOffset(), valueNode.getLength(), getValue(eObject, eStructuralFeature));
}
- // Otherwise, we just need to add a new key/value mapping to the end of the list.
- // @GenModel(a="x")
- // ^
+ }
+ // If this is the first detail entry...
+ //
+ else if (xAnnotation != null && xAnnotation.getDetails().isEmpty())
+ {
+ // Add the key/value mapping with new parentheses.
+ // @GenModel
+ // ^
//
- else
- {
- int offset = annotationNode.getOffset() + annotationNode.getLength() - 1;
- document.replace(offset, 0, ", " + name + "=" + getValue(eObject, eStructuralFeature));
- }
+ int offset = annotationNode.getOffset() + annotationNode.getLength();
+ document.replace(offset, 0, "(" + name + "=" + getValue(eObject, eStructuralFeature) + ")");
+ }
+ // Otherwise, we just need to add a new key/value mapping to the end of the list.
+ // @GenModel(a="x")
+ // ^
+ //
+ else
+ {
+ int offset = annotationNode.getOffset() + annotationNode.getLength() - 1;
+ document.replace(offset, 0, ", " + name + "=" + getValue(eObject, eStructuralFeature));
}
}
}
- });
- }
+ }
+ });
}
- };
+ }
+ };
- // Create the editing domain with a special command stack.
- // Be sure that only objects in the main resource are modifiable.
- //
- final AdapterFactoryEditingDomain editingDomain =
- new AdapterFactoryEditingDomain(adapterFactory, commandStack, resourceSet)
+ // Create the editing domain with a special command stack.
+ // Be sure that only objects in the main resource are modifiable.
+ //
+ final AdapterFactoryEditingDomain editingDomain =
+ new AdapterFactoryEditingDomain(adapterFactory, commandStack, resourceSet)
+ {
+ @Override
+ public boolean isReadOnly(Resource resource)
{
- @Override
- public boolean isReadOnly(Resource resource)
- {
- return super.isReadOnly(resource) || getResourceSet().getResources().indexOf(resource) != 0;
- }
- };
+ return super.isReadOnly(resource) || getResourceSet().getResources().indexOf(resource) != 0;
+ }
+ };
+
+ // Ensure that the editing domain for the resource set can be determined.
+ //
+ class EditingDomainProvider extends AdapterImpl implements IEditingDomainProvider
+ {
+ public EditingDomain getEditingDomain()
+ {
+ return editingDomain;
+ }
+ @Override
+ public boolean isAdapterForType(Object type)
+ {
+ return IEditingDomainProvider.class.equals(type);
+ }
+ }
+ resourceSet.eAdapters().add(new EditingDomainProvider());
- // Ensure that the editing domain for the resource set can be determined.
- //
- class EditingDomainProvider extends AdapterImpl implements IEditingDomainProvider
+ // Create a specialized property sheet page.
+ //
+ final PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain)
{
- public EditingDomain getEditingDomain()
+ @Override
+ public void setSelectionToViewer(List<?> selection)
{
- return editingDomain;
+ // TODO
+ XcoreEditor.this.setFocus();
}
+
@Override
- public boolean isAdapterForType(Object type)
+ public void setActionBars(IActionBars actionBars)
{
- return IEditingDomainProvider.class.equals(type);
+ // Ensure that the undo/redo actions are hooked up.
+ //
+ super.setActionBars(actionBars);
+ TextEditorActionContributor actionBarContributor = (TextEditorActionContributor)getEditorSite().getActionBarContributor();
+ IActionBars editorActionBars = actionBarContributor.getActionBars();
+ actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), editorActionBars.getGlobalActionHandler((ActionFactory.UNDO.getId())));
+ actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), editorActionBars.getGlobalActionHandler((ActionFactory.REDO.getId())));
}
- }
- resourceSet.eAdapters().add(new EditingDomainProvider());
- // Create a specialized property sheet page.
- //
- propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain)
+ /**
+ * A helper utility for processing an EObject to determine the appropriate GenModel element to select.
+ * Returns whether candidate was successfully determined.
+ */
+ protected boolean selectionChanged(IWorkbenchPart part, EObject eObject)
{
- @Override
- public void setSelectionToViewer(List<?> selection)
+ if (eObject instanceof XNamedElement)
{
- // TODO
- XcoreEditor.this.setFocus();
- }
-
- @Override
- public void setActionBars(IActionBars actionBars)
- {
- // Ensure that the undo/redo actions are hooked up.
- //
- super.setActionBars(actionBars);
- TextEditorActionContributor actionBarContributor = (TextEditorActionContributor)getEditorSite().getActionBarContributor();
- IActionBars editorActionBars = actionBarContributor.getActionBars();
- actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), editorActionBars.getGlobalActionHandler((ActionFactory.UNDO.getId())));
- actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), editorActionBars.getGlobalActionHandler((ActionFactory.REDO.getId())));
- }
-
- /**
- * A helper utility for processing an EObject to determine the appropriate GenModel element to select.
- * Returns whether candidate was successfully determined.
- */
- protected boolean selectionChanged(IWorkbenchPart part, EObject eObject)
- {
- if (eObject instanceof XNamedElement)
+ GenBase genBase = mapper.getGen((XNamedElement)eObject);
+ if (genBase instanceof GenPackage)
{
- GenBase genBase = mapper.getGen((XNamedElement)eObject);
- if (genBase instanceof GenPackage)
- {
- genBase = ((GenPackage)genBase).getGenModel();
- }
- if (genBase != null)
- {
- selectionChanged(part, new StructuredSelection(genBase));
- return true;
- }
+ genBase = ((GenPackage)genBase).getGenModel();
}
- else if (eObject != null)
+ if (genBase != null)
{
- return selectionChanged(part, eObject.eContainer());
+ selectionChanged(part, new StructuredSelection(genBase));
+ return true;
}
- return false;
}
-
- @Override
- public void selectionChanged(final IWorkbenchPart part, ISelection selection)
+ else if (eObject != null)
{
- if (selection instanceof IStructuredSelection)
- {
- // If the first element is an EObjectNode from the outline view...
- //
- Object element = ((IStructuredSelection)selection).getFirstElement();
- if (element instanceof EObjectNode)
- {
- final EObjectNode eObjectNode = (EObjectNode)element;
- IXtextDocument document = getDocument();
- Boolean handled =
- document.readOnly
- (new IUnitOfWork<Boolean, XtextResource>()
- {
- public Boolean exec(XtextResource xtextResource) throws Exception
- {
- // Determine the EObject and process that instead.
- //
- EObject eObject = eObjectNode.getEObject(xtextResource);
- return selectionChanged(part, eObject);
- }
- });
+ return selectionChanged(part, eObject.eContainer());
+ }
+ return false;
+ }
- // Don't continue with default processing if we've already successfully processed the selection.
- //
- if (handled)
- {
- return;
- }
- }
- }
- else if (selection instanceof ITextSelection)
+ @Override
+ public void selectionChanged(final IWorkbenchPart part, ISelection selection)
+ {
+ if (selection instanceof IStructuredSelection)
+ {
+ // If the first element is an EObjectNode from the outline view...
+ //
+ Object element = ((IStructuredSelection)selection).getFirstElement();
+ if (element instanceof EObjectNode)
{
- // Map the selection to a model object...
- //
- final ITextSelection textSelection = (ITextSelection)selection;
+ final EObjectNode eObjectNode = (EObjectNode)element;
IXtextDocument document = getDocument();
Boolean handled =
document.readOnly
@@ -658,23 +642,10 @@ public class XcoreEditor extends XtextEditor
{
public Boolean exec(XtextResource xtextResource) throws Exception
{
- IParseResult parseResult = xtextResource.getParseResult();
- if (parseResult != null)
- {
- ICompositeNode rootNode = parseResult.getRootNode();
- if (rootNode != null)
- {
- ILeafNode node = NodeModelUtils.findLeafNodeAtOffset(rootNode, textSelection.getOffset());
- if (node != null)
- {
- // Determine the EObject and process that instead.
- //
- EObject eObject = NodeModelUtils.findActualSemanticObjectFor(node);
- return selectionChanged(part, eObject);
- }
- }
- }
- return Boolean.FALSE;
+ // Determine the EObject and process that instead.
+ //
+ EObject eObject = eObjectNode.getEObject(xtextResource);
+ return selectionChanged(part, eObject);
}
});
@@ -684,30 +655,70 @@ public class XcoreEditor extends XtextEditor
{
return;
}
-
- selection = new StructuredSelection();
}
- super.selectionChanged(part, selection);
}
- };
+ else if (selection instanceof ITextSelection)
+ {
+ // Map the selection to a model object...
+ //
+ final ITextSelection textSelection = (ITextSelection)selection;
+ IXtextDocument document = getDocument();
+ Boolean handled =
+ document.readOnly
+ (new IUnitOfWork<Boolean, XtextResource>()
+ {
+ public Boolean exec(XtextResource xtextResource) throws Exception
+ {
+ IParseResult parseResult = xtextResource.getParseResult();
+ if (parseResult != null)
+ {
+ ICompositeNode rootNode = parseResult.getRootNode();
+ if (rootNode != null)
+ {
+ ILeafNode node = NodeModelUtils.findLeafNodeAtOffset(rootNode, textSelection.getOffset());
+ if (node != null)
+ {
+ // Determine the EObject and process that instead.
+ //
+ EObject eObject = NodeModelUtils.findActualSemanticObjectFor(node);
+ return selectionChanged(part, eObject);
+ }
+ }
+ }
+ return Boolean.FALSE;
+ }
+ });
- // Set the content provider.
- //
- final AdapterFactoryContentProvider contentProvider = new AdapterFactoryContentProvider(adapterFactory);
- propertySheetPage.setPropertySourceProvider(contentProvider);
+ // Don't continue with default processing if we've already successfully processed the selection.
+ //
+ if (handled)
+ {
+ return;
+ }
- // Set the initial selection.
- //
- getEditorSite().getShell().getDisplay().asyncExec
- (new Runnable()
+ selection = new StructuredSelection();
+ }
+ super.selectionChanged(part, selection);
+ }
+ };
+
+ // Set the content provider.
+ //
+ final AdapterFactoryContentProvider contentProvider = new AdapterFactoryContentProvider(adapterFactory);
+ propertySheetPage.setPropertySourceProvider(contentProvider);
+
+ // Set the initial selection.
+ //
+ getEditorSite().getShell().getDisplay().asyncExec
+ (new Runnable()
+ {
+ public void run()
{
- public void run()
- {
- propertySheetPage.selectionChanged(XcoreEditor.this, getSourceViewer().getSelectionProvider().getSelection());
+ propertySheetPage.selectionChanged(XcoreEditor.this, getSourceViewer().getSelectionProvider().getSelection());
+ }
+ });
- }
- });
- }
+ propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -722,7 +733,7 @@ public class XcoreEditor extends XtextEditor
adapterFactory.dispose();
}
- if (propertySheetPage != null)
+ for (PropertySheetPage propertySheetPage : propertySheetPages)
{
propertySheetPage.dispose();
}
diff --git a/plugins/org.eclipse.emf.ecore/model/Ecore.genmodel b/plugins/org.eclipse.emf.ecore/model/Ecore.genmodel
index 8120ed14e..839af4377 100644
--- a/plugins/org.eclipse.emf.ecore/model/Ecore.genmodel
+++ b/plugins/org.eclipse.emf.ecore/model/Ecore.genmodel
@@ -4,7 +4,7 @@
runtimeJar="true" modelName="Ecore" updateClasspath="false" testsDirectory=""
booleanFlagsField="eFlags" booleanFlagsReservedBits="8" importerID="org.eclipse.emf.importer.ecore"
containmentProxies="true" minimalReflectiveMethods="false" complianceLevel="5.0"
- language="en" operationReflection="true">
+ language="en" operationReflection="true" decoration="Live">
<genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter">
<genAnnotations source="selectedPackages">
<details key="http://www.eclipse.org/emf/2002/Ecore" value="Ecore.xsd"/>

Back to the top