diff options
author | Ansgar Radermacher | 2021-04-01 08:14:03 +0000 |
---|---|---|
committer | vincent lorenzo | 2021-07-30 09:17:14 +0000 |
commit | 99df468047260c4c5bd8fe9d691f714b8c53b176 (patch) | |
tree | 4df87340ba788f4ce0f07365360b9bf157a9700b /plugins | |
parent | ece7e6a78d634c1c9ad46929def688505332d472 (diff) | |
download | org.eclipse.papyrus-99df468047260c4c5bd8fe9d691f714b8c53b176.tar.gz org.eclipse.papyrus-99df468047260c4c5bd8fe9d691f714b8c53b176.tar.xz org.eclipse.papyrus-99df468047260c4c5bd8fe9d691f714b8c53b176.zip |
Bug 572487 - [Designer, Codegen] Move ProjectBasedFileAccess and ICleanCode interfaces to Designer
- Mark these the two classes as deprecate in core Papyrus as they are moved to designer
- Increase minor version number to 4.2.0
Signed-off-by: Ansgar Radermacher <ansgar.radermacher@cea.fr>
Change-Id: I17324dd3332194c58dc5b71d2f235315aad68f24
Diffstat (limited to 'plugins')
4 files changed, 15 insertions, 6 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF index 06b66a010d7..c212792cf0f 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF +++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF @@ -15,7 +15,7 @@ Require-Bundle: org.apache.commons.io;bundle-version="[2.6.0,3.0.0)", org.eclipse.jdt.core;bundle-version="[3.24.0,4.0.0)";resolution:=optional Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy -Bundle-Version: 4.1.0.qualifier +Bundle-Version: 4.2.0.qualifier Eclipse-BuddyPolicy: dependent Bundle-Name: %Bundle-Name Bundle-Activator: org.eclipse.papyrus.infra.tools.Activator diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml b/plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml index 47288d91e82..2ca41990813 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml +++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml @@ -9,6 +9,6 @@ <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.papyrus.infra.tools</artifactId> - <version>4.1.0-SNAPSHOT</version> + <version>4.2.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
\ No newline at end of file diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/file/ICleanUntouched.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/file/ICleanUntouched.java index a140d0d5f70..0005ff89731 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/file/ICleanUntouched.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/file/ICleanUntouched.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018 CEA LIST. + * Copyright (c) 2018, 2021 CEA LIST. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -9,6 +9,7 @@ * * Contributors: * CEA LIST - initial API and implementation + * Ansgar Radermacher - Bug 572487 *******************************************************************************/ package org.eclipse.papyrus.infra.tools.file; @@ -20,7 +21,9 @@ import org.eclipse.core.runtime.IProgressMonitor; /** * Manage the deletion of code that has not been access in the code generation * process and can be removed. + * * @since 3.0 + * @Deprecated(since="4.2", forRemoval=true) Moved to designer (oep.designer.languages.common.base) */ public interface ICleanUntouched { diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/file/ProjectBasedFileAccess.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/file/ProjectBasedFileAccess.java index 3cd355854ba..af73e755444 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/file/ProjectBasedFileAccess.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/file/ProjectBasedFileAccess.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014, 2018 CEA LIST and others. + * Copyright (c) 2014, 2018, 2021 CEA LIST and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -10,6 +10,7 @@ * * Contributors: * CEA LIST - Initial API and implementation + * Ansgar Radermacher - Bug 572487 * *****************************************************************************/ @@ -33,7 +34,9 @@ import org.eclipse.core.runtime.IProgressMonitor; /** * A simple class providing access to the file system relative to a specified project * + * @Deprecated(since="4.2", forRemoval=true) Moved to designer (oep.designer.languages.common.base) */ +@Deprecated public class ProjectBasedFileAccess implements IPFileSystemAccess, ICleanUntouched { IProject project; @@ -42,6 +45,7 @@ public class ProjectBasedFileAccess implements IPFileSystemAccess, ICleanUntouch /** * Store information which files have been created in a hash map + * * @since 3.0 */ protected Map<String, Boolean> touched; @@ -71,7 +75,7 @@ public class ProjectBasedFileAccess implements IPFileSystemAccess, ICleanUntouch */ public ProjectBasedFileAccess(IProject project, String subFolderName) { setProject(project, subFolderName); - touched = new HashMap<String, Boolean>(); + touched = new HashMap<>(); } /** @@ -106,6 +110,7 @@ public class ProjectBasedFileAccess implements IPFileSystemAccess, ICleanUntouch * @param contents * the content to write */ + @Override public void generateFile(String fileName, String content) { IFile file = getFile(fileName); touched.put(file.getFullPath().toString(), true); @@ -113,7 +118,7 @@ public class ProjectBasedFileAccess implements IPFileSystemAccess, ICleanUntouch try { boolean needsRefresh = false; if (file.exists()) { - if (!IOUtils.contentEquals( file.getContents(), contentStream)) { + if (!IOUtils.contentEquals(file.getContents(), contentStream)) { if (force) { contentStream.reset(); file.setContents(contentStream, true, true, null); @@ -144,6 +149,7 @@ public class ProjectBasedFileAccess implements IPFileSystemAccess, ICleanUntouch * @param fileName * the filename relative to the project and sub-folder specified in the constructor */ + @Override public void deleteFile(String fileName) { IFile file = getFile(fileName); try { |