Skip to content
Snippets Groups Projects
Commit 3119e3d9 authored by Simon Barner's avatar Simon Barner
Browse files

Prevent library from being shown in model element navigator

- Re-add accidentally removed exception
- Add TODO

Issue-Ref: 4161
Issue-Url: af3#4161



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent 771fc63e
No related branches found
No related tags found
1 merge request!1583946: Remove unused GEF/SWT editors/views
Pipeline #33499 passed
Pipeline: maven-releng

#33500

    ......@@ -6,7 +6,7 @@ DummyTopLevelElement.java 8394597464707992cd053e68129bb87ce9f696db GREEN
    ElementCompositorService.java b1924b5b349118a70149cfac5b48544897d26e9e YELLOW
    LoggingService.java da784259f7b456b54bf75c41ec268f64919ce78d GREEN
    MigrationService.java 017c8438262065f663427a998536035bc7732fe1 GREEN
    PersistencyService.java 1e4ee148cd566900d6ea3423cc2d5ba7b3325670 YELLOW
    PersistencyService.java 509b4e6499fe7211d44d043a4dbad83ee55be761 YELLOW
    PrototypeService.java 3906786b259e32a487fea505fa03af95ec652660 YELLOW
    ToolingKernelInternal.java afbd2ccb5277ffdaa5e8d6b901dc10b61ef4a36d YELLOW
    TransformationService.java 64ee4fb5ccc623f8acfba20866fc2b0944c4adab GREEN
    ......
    ......@@ -37,6 +37,7 @@ import org.conqat.lib.commons.collections.UnmodifiableList;
    import org.eclipse.core.resources.WorkspaceJob;
    import org.eclipse.core.runtime.CoreException;
    import org.eclipse.core.runtime.IConfigurationElement;
    import org.eclipse.core.runtime.ILibrary;
    import org.eclipse.core.runtime.IProgressMonitor;
    import org.eclipse.core.runtime.IStatus;
    import org.eclipse.core.runtime.Status;
    ......@@ -243,6 +244,10 @@ public class PersistencyService implements IPersistencyService, IIntrospectiveKe
    /** Notifies listener about top-level element loading (startup). */
    private synchronized void notifyListenersAboutLoad(ITopLevelElement top) {
    // TODO (#4219) Is this the right way to prevent showing libraries in the navigator
    if(top.getRootModelElement() instanceof ILibrary) {
    return;
    }
    for(IPersistencyServiceListener listener : new ArrayList<>(listeners)) {
    listener.topLevelElementLoaded(top);
    }
    ......@@ -250,6 +255,10 @@ public class PersistencyService implements IPersistencyService, IIntrospectiveKe
    /** Notifies listener about top-level element adding. */
    private synchronized void notifyListenersAboutAdd(ITopLevelElement top) {
    // TODO (#4219) Is this the right way to prevent showing libraries in the navigator
    if(top.getRootModelElement() instanceof ILibrary) {
    return;
    }
    for(IPersistencyServiceListener listener : new ArrayList<>(listeners)) {
    listener.topLevelElementAdded(top);
    }
    ......@@ -257,6 +266,10 @@ public class PersistencyService implements IPersistencyService, IIntrospectiveKe
    /** Notifies listener about top-level element removal. */
    private synchronized void notifyListenersAboutRemove(ITopLevelElement top) {
    // TODO (#4219) Is this the right way to prevent showing libraries in the navigator
    if(top.getRootModelElement() instanceof ILibrary) {
    return;
    }
    for(IPersistencyServiceListener listener : new ArrayList<>(listeners)) {
    listener.topLevelElementRemoved(top);
    }
    ......@@ -265,6 +278,10 @@ public class PersistencyService implements IPersistencyService, IIntrospectiveKe
    /** {@inheritDoc} */
    @Override
    public void notifyTopLevelElementChanged(final ITopLevelElement top) {
    // TODO (#4219) Is this the right way to prevent showing libraries in the navigator
    if(top.getRootModelElement() instanceof ILibrary) {
    return;
    }
    // schedule persistency service notification
    new WorkspaceJob("Notify TopLevelElement Changed") {
    @Override
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment