Search in sources :

Example 1 with RemoveModelProjectListener

use of org.eclipse.vorto.perspective.listener.RemoveModelProjectListener in project vorto by eclipse.

the class AbstractProjectSelectionViewPart method addWorkspaceChangeEventListenr.

protected void addWorkspaceChangeEventListenr() {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    removeProjectListener = new RemoveModelProjectListener(this);
    errorDiagnosticsListener = new ErrorDiagnosticListener(newRefreshCurrentProjectRunnable());
    removeModelListener = new RemoveModelListener(newRefreshCurrentProjectRunnable());
    removeImportListener = new RemoveImportListener(newRefreshCurrentProjectRunnable());
    workspace.addResourceChangeListener(removeImportListener, IResourceChangeEvent.POST_CHANGE);
    workspace.addResourceChangeListener(removeProjectListener, IResourceChangeEvent.PRE_DELETE);
    workspace.addResourceChangeListener(errorDiagnosticsListener, IResourceChangeEvent.POST_CHANGE);
    workspace.addResourceChangeListener(removeModelListener, IResourceChangeEvent.POST_CHANGE);
}
Also used : RemoveModelProjectListener(org.eclipse.vorto.perspective.listener.RemoveModelProjectListener) RemoveModelListener(org.eclipse.vorto.perspective.listener.RemoveModelListener) RemoveImportListener(org.eclipse.vorto.perspective.listener.RemoveImportListener) ErrorDiagnosticListener(org.eclipse.vorto.perspective.listener.ErrorDiagnosticListener) IWorkspace(org.eclipse.core.resources.IWorkspace)

Aggregations

IWorkspace (org.eclipse.core.resources.IWorkspace)1 ErrorDiagnosticListener (org.eclipse.vorto.perspective.listener.ErrorDiagnosticListener)1 RemoveImportListener (org.eclipse.vorto.perspective.listener.RemoveImportListener)1 RemoveModelListener (org.eclipse.vorto.perspective.listener.RemoveModelListener)1 RemoveModelProjectListener (org.eclipse.vorto.perspective.listener.RemoveModelProjectListener)1