diff options
Diffstat (limited to 'plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusModelFactory.java')
-rw-r--r-- | plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusModelFactory.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusModelFactory.java b/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusModelFactory.java new file mode 100644 index 00000000000..db0a9390b1f --- /dev/null +++ b/plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/model/impl/PapyrusModelFactory.java @@ -0,0 +1,35 @@ +/***************************************************************************** + * Copyright (c) 2011 Atos Origin Integration. + * + * 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: + * Tristan Faure (Atos Origin Integration) tristan.faure@atosorigin.com - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.onefile.model.impl; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel; +import org.eclipse.papyrus.infra.onefile.model.IPapyrusFile; +import org.eclipse.papyrus.infra.onefile.model.IPapyrusModelFactory; +import org.eclipse.papyrus.infra.onefile.model.ISubResourceFile; + +public class PapyrusModelFactory implements IPapyrusModelFactory { + + public IPapyrusFile createIPapyrusFile(IFile file) { + return new PapyrusFile(file); + } + + public ISubResourceFile createISubResourceFile(IPapyrusFile papy, IFile r) { + return new SubResourceFile(papy, r); + } + + public boolean isDi(IResource file) { + return DiModel.DI_FILE_EXTENSION.equals(file.getFileExtension()); + } + +} |