Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/internal/resource/index/IIndexSaveParticipant.java')
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/internal/resource/index/IIndexSaveParticipant.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/internal/resource/index/IIndexSaveParticipant.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/internal/resource/index/IIndexSaveParticipant.java
new file mode 100644
index 00000000000..ab570a6bb22
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/internal/resource/index/IIndexSaveParticipant.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.internal.resource.index;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.eclipse.core.resources.ISaveParticipant;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndex;
+
+/**
+ * Protocol for an extension of the plug-in's {@link ISaveParticipant}
+ * that saves the current state of a {@link WorkspaceModelIndex}.
+ */
+public interface IIndexSaveParticipant {
+ /**
+ * Saves an {@code index} to a file.
+ *
+ * @param index
+ * the index to save
+ * @param store
+ * the output stream on which to save it. The caller may choose to
+ * {@link OutputStream#close() close} this stream but is not
+ * required to
+ *
+ * @throws IOException
+ * on failure to write to the {@code store}
+ * @throws CoreException
+ * on failure to save the {@code index}
+ */
+ void save(WorkspaceModelIndex<?> index, OutputStream output) throws IOException, CoreException;
+}

Back to the top