Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/editor/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IFileEditor.java')
-rw-r--r--plugins/editor/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IFileEditor.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/plugins/editor/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IFileEditor.java b/plugins/editor/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IFileEditor.java
new file mode 100644
index 00000000000..89879fcba2f
--- /dev/null
+++ b/plugins/editor/org.eclipse.papyrus.eclipse.project.editors/src/org/eclipse/papyrus/eclipse/project/editors/interfaces/IFileEditor.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.eclipse.project.editors.interfaces;
+
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+
+/**
+ *
+ * Interface to edit file
+ *
+ */
+public interface IFileEditor {
+
+ /** test if all the required elements exist for the editor */
+ public boolean exists();
+
+
+ /** create the required elements for the editor */
+ public abstract void create();
+
+ /**
+ * a method to initialize the field of the editors
+ * This method should be called by the programmer AFTER the construciton of the element
+ */
+ public abstract void init();
+
+ /**
+ *
+ * @return
+ * the missing files for the project
+ */
+ public Set<String> getMissingFiles();
+
+ /**
+ *
+ * @param files
+ * create the required files
+ */
+ public void createFiles(final Set<String> files);
+
+
+ // TODO : Remove that "Throwable" exception...
+ /** save the modification on the editor */
+ public void save();
+
+ /**
+ *
+ * @return
+ * the eclipse project
+ */
+ public IProject getProject();
+
+}

Back to the top