Skip to content

Commit

Permalink
Regenerate metamodel code with current EMF version
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoKlare committed Mar 20, 2020
1 parent d100ffc commit 3091bab
Show file tree
Hide file tree
Showing 52 changed files with 451 additions and 141 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Require-Bundle: org.eclipse.core.runtime,
edu.kit.ipd.sdq.metamodels.addresses;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: edu.kit.ipd.sdq.metamodels.addresses.edit
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public Adapter createAddressAdapter() {
* <!-- end-user-doc -->
* @generated
*/
@Override
public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
}
Expand All @@ -133,6 +134,7 @@ public ComposeableAdapterFactory getRootAdapterFactory() {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
this.parentAdapterFactory = parentAdapterFactory;
}
Expand Down Expand Up @@ -181,6 +183,7 @@ public Object adapt(Object object, Object type) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void addListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.addListener(notifyChangedListener);
}
Expand All @@ -191,6 +194,7 @@ public void addListener(INotifyChangedListener notifyChangedListener) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
}
Expand All @@ -201,6 +205,7 @@ public void removeListener(INotifyChangedListener notifyChangedListener) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void fireNotifyChanged(Notification notification) {
changeNotifier.fireNotifyChanged(notification);

Expand All @@ -215,6 +220,7 @@ public void fireNotifyChanged(Notification notification) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void dispose() {
if (addressesItemProvider != null) addressesItemProvider.dispose();
if (addressItemProvider != null) addressItemProvider.dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.edit.ui;visibility:=reexport,
org.eclipse.ui.ide;visibility:=reexport
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: edu.kit.ipd.sdq.metamodels.addresses.editor
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ public AddressesActionBarContributor() {
*/
@Override
public void contributeToToolBar(IToolBarManager toolBarManager) {
super.contributeToToolBar(toolBarManager);
toolBarManager.add(new Separator("addresses-settings"));
toolBarManager.add(new Separator("addresses-additions"));
}
Expand Down Expand Up @@ -199,6 +200,7 @@ public void contributeToMenu(IMenuManager menuManager) {
//
submenuManager.addMenuListener
(new IMenuListener() {
@Override
public void menuAboutToShow(IMenuManager menuManager) {
menuManager.updateAll(true);
}
Expand Down Expand Up @@ -246,6 +248,7 @@ public void setActiveEditor(IEditorPart part) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void selectionChanged(SelectionChangedEvent event) {
// Remove any menu items for old selection.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

import org.eclipse.swt.graphics.Point;

import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;

import org.eclipse.swt.widgets.Composite;
Expand Down Expand Up @@ -324,6 +325,7 @@ public class AddressesEditor
*/
protected IPartListener partListener =
new IPartListener() {
@Override
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
Expand All @@ -342,15 +344,19 @@ else if (p == AddressesEditor.this) {
handleActivate();
}
}
@Override
public void partBroughtToTop(IWorkbenchPart p) {
// Ignore.
}
@Override
public void partClosed(IWorkbenchPart p) {
// Ignore.
}
@Override
public void partDeactivated(IWorkbenchPart p) {
// Ignore.
}
@Override
public void partOpened(IWorkbenchPart p) {
// Ignore.
}
Expand Down Expand Up @@ -436,6 +442,7 @@ protected void dispatchUpdateProblemIndication() {
dispatching = true;
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
@Override
public void run() {
dispatching = false;
updateProblemIndication();
Expand Down Expand Up @@ -465,6 +472,7 @@ protected void unsetTarget(Resource target) {
*/
protected IResourceChangeListener resourceChangeListener =
new IResourceChangeListener() {
@Override
public void resourceChanged(IResourceChangeEvent event) {
IResourceDelta delta = event.getDelta();
try {
Expand All @@ -473,6 +481,7 @@ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
protected Collection<Resource> changedResources = new ArrayList<Resource>();
protected Collection<Resource> removedResources = new ArrayList<Resource>();

@Override
public boolean visit(IResourceDelta delta) {
if (delta.getResource().getType() == IResource.FILE) {
if (delta.getKind() == IResourceDelta.REMOVED ||
Expand Down Expand Up @@ -508,6 +517,7 @@ public Collection<Resource> getRemovedResources() {
if (!visitor.getRemovedResources().isEmpty()) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
@Override
public void run() {
removedResources.addAll(visitor.getRemovedResources());
if (!isDirty()) {
Expand All @@ -520,6 +530,7 @@ public void run() {
if (!visitor.getChangedResources().isEmpty()) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
@Override
public void run() {
changedResources.addAll(visitor.getChangedResources());
if (getSite().getPage().getActiveEditor() == AddressesEditor.this) {
Expand Down Expand Up @@ -578,8 +589,9 @@ else if (!changedResources.isEmpty()) {
*/
protected void handleChangedResources() {
if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
ResourceSet resourceSet = editingDomain.getResourceSet();
if (isDirty()) {
changedResources.addAll(editingDomain.getResourceSet().getResources());
changedResources.addAll(resourceSet.getResources());
}
editingDomain.getCommandStack().flush();

Expand All @@ -588,7 +600,7 @@ protected void handleChangedResources() {
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
resource.load(resourceSet.getLoadOptions());
}
catch (IOException exception) {
if (!resourceToDiagnosticMap.containsKey(resource)) {
Expand Down Expand Up @@ -709,9 +721,11 @@ protected void initializeEditingDomain() {
//
commandStack.addCommandStackListener
(new CommandStackListener() {
@Override
public void commandStackChanged(final EventObject event) {
getContainer().getDisplay().asyncExec
(new Runnable() {
@Override
public void run() {
firePropertyChange(IEditorPart.PROP_DIRTY);

Expand All @@ -723,7 +737,7 @@ public void run() {
}
for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
PropertySheetPage propertySheetPage = i.next();
if (propertySheetPage.getControl().isDisposed()) {
if (propertySheetPage.getControl() == null || propertySheetPage.getControl().isDisposed()) {
i.remove();
}
else {
Expand Down Expand Up @@ -764,6 +778,7 @@ public void setSelectionToViewer(Collection<?> collection) {
if (theSelection != null && !theSelection.isEmpty()) {
Runnable runnable =
new Runnable() {
@Override
public void run() {
// Try to select the items in the current content viewer of the editor.
//
Expand All @@ -784,6 +799,7 @@ public void run() {
* <!-- end-user-doc -->
* @generated
*/
@Override
public EditingDomain getEditingDomain() {
return editingDomain;
}
Expand Down Expand Up @@ -880,6 +896,7 @@ public void setCurrentViewer(Viewer viewer) {
new ISelectionChangedListener() {
// This just notifies those things that are affected by the section.
//
@Override
public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
setSelection(selectionChangedEvent.getSelection());
}
Expand Down Expand Up @@ -914,6 +931,7 @@ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public Viewer getViewer() {
return currentViewer;
}
Expand Down Expand Up @@ -1219,8 +1237,11 @@ public void requestActivation() {

getSite().getShell().getDisplay().asyncExec
(new Runnable() {
@Override
public void run() {
setActivePage(0);
if (!getContainer().isDisposed()) {
setActivePage(0);
}
}
});
}
Expand All @@ -1243,6 +1264,7 @@ public void controlResized(ControlEvent event) {

getSite().getShell().getDisplay().asyncExec
(new Runnable() {
@Override
public void run() {
updateProblemIndication();
}
Expand All @@ -1260,9 +1282,9 @@ protected void hideTabs() {
if (getPageCount() <= 1) {
setPageText(0, "");
if (getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(1);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y + 6);
Rectangle clientArea = getContainer().getClientArea();
getContainer().setSize(point.x, 2 * point.y - clientArea.height - clientArea.y);
}
}
}
Expand All @@ -1278,9 +1300,9 @@ protected void showTabs() {
if (getPageCount() > 1) {
setPageText(0, getString("_UI_SelectionPage_label"));
if (getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y - 6);
Rectangle clientArea = getContainer().getClientArea();
getContainer().setSize(point.x, clientArea.height + clientArea.y);
}
}
}
Expand All @@ -1306,17 +1328,16 @@ protected void pageChange(int pageIndex) {
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class key) {
public <T> T getAdapter(Class<T> key) {
if (key.equals(IContentOutlinePage.class)) {
return showOutlineView() ? getContentOutlinePage() : null;
return showOutlineView() ? key.cast(getContentOutlinePage()) : null;
}
else if (key.equals(IPropertySheetPage.class)) {
return getPropertySheetPage();
return key.cast(getPropertySheetPage());
}
else if (key.equals(IGotoMarker.class)) {
return this;
return key.cast(this);
}
else {
return super.getAdapter(key);
Expand Down Expand Up @@ -1379,6 +1400,7 @@ public void setActionBars(IActionBars actionBars) {
(new ISelectionChangedListener() {
// This ensures that we handle selections correctly.
//
@Override
public void selectionChanged(SelectionChangedEvent event) {
handleContentOutlineSelection(event.getSelection());
}
Expand All @@ -1396,7 +1418,7 @@ public void selectionChanged(SelectionChangedEvent event) {
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage =
new ExtendedPropertySheetPage(editingDomain) {
new ExtendedPropertySheetPage(editingDomain, ExtendedPropertySheetPage.Decoration.NONE, null, 0, false) {
@Override
public void setSelectionToViewer(List<?> selection) {
AddressesEditor.this.setSelectionToViewer(selection);
Expand Down Expand Up @@ -1603,6 +1625,7 @@ protected void doSaveAs(URI uri, IEditorInput editorInput) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void gotoMarker(IMarker marker) {
List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
if (!targetObjects.isEmpty()) {
Expand Down Expand Up @@ -1647,6 +1670,7 @@ public void setFocus() {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
selectionChangedListeners.add(listener);
}
Expand All @@ -1657,6 +1681,7 @@ public void addSelectionChangedListener(ISelectionChangedListener listener) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
selectionChangedListeners.remove(listener);
}
Expand All @@ -1667,6 +1692,7 @@ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public ISelection getSelection() {
return editorSelection;
}
Expand All @@ -1678,6 +1704,7 @@ public ISelection getSelection() {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setSelection(ISelection selection) {
editorSelection = selection;

Expand Down Expand Up @@ -1747,6 +1774,7 @@ private static String getString(String key, Object s1) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void menuAboutToShow(IMenuManager menuManager) {
((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public class AddressesModelWizard extends Wizard implements INewWizard {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
Expand Down Expand Up @@ -278,6 +279,7 @@ protected void execute(IProgressMonitor progressMonitor) {
final ISelection targetSelection = new StructuredSelection(modelFile);
getShell().getDisplay().asyncExec
(new Runnable() {
@Override
public void run() {
((ISetSelectionTarget)activePart).selectReveal(targetSelection);
}
Expand Down Expand Up @@ -394,6 +396,7 @@ public AddressesModelWizardInitialObjectCreationPage(String pageId) {
* <!-- end-user-doc -->
* @generated
*/
@Override
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE); {
GridLayout layout = new GridLayout();
Expand Down Expand Up @@ -468,6 +471,7 @@ public void createControl(Composite parent) {
*/
protected ModifyListener validator =
new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
setPageComplete(validatePage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Export-Package: edu.kit.ipd.sdq.metamodels.addresses,
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: edu.kit.ipd.sdq.metamodels.addresses
Loading

0 comments on commit 3091bab

Please sign in to comment.