Commit daa66ef9 authored by Alexander Diewald's avatar Alexander Diewald

Merge branch '3993' into 'master'

3993

See merge request !327
parents 5743242f 7dbe040b
......@@ -16,7 +16,6 @@
package test.org.fortiss.af3.component.library;
import static org.fortiss.af3.component.utils.ComponentLibraryModelElementFactory.createLibraryComponentPackage;
import static org.fortiss.af3.project.utils.FileUtils.saveFileLibrary;
import static org.fortiss.af3.project.utils.LibraryModelElementFactory.createFileLibrary;
import static org.fortiss.tooling.kernel.utils.PrototypesUtils.findPrototypeComposableWith;
......@@ -29,6 +28,7 @@ import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.ComponentRef;
import org.fortiss.af3.component.model.LibraryComponentPackage;
import org.fortiss.af3.project.model.FileLibrary;
import org.fortiss.af3.project.utils.ProjectUtils;
import org.fortiss.tooling.base.library.ModelElementLibraryService;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.extension.data.Prototype;
......@@ -96,7 +96,7 @@ public class LibraryTestBase {
FileLibrary fileLibrary = createFileLibrary(libName);
LibraryComponentPackage libraryComponentPackage = createLibraryComponentPackage(packName);
fileLibrary.getRootElements().add(libraryComponentPackage);
saveFileLibrary(fileLibrary);
ProjectUtils.saveFileLibrary(fileLibrary);
sleep();
}
......
ImageBox.java 7ad103552d87ea816caaef06a179c15a3b46e9ea GREEN
ImageSection.java 470d2d525a02444e9f169e50e07a56d8c5707b04 GREEN
ImageBox.java 24860c6f9f2652cee7f8b1d81f1fff1f199b0383 GREEN
ImageSection.java acaeba2f544bf128b09bf0c9ea8a9815dcaaebef GREEN
......@@ -21,7 +21,7 @@ import static org.conqat.lib.commons.string.StringUtils.concat;
import static org.eclipse.jface.layout.GridDataFactory.swtDefaults;
import static org.fortiss.af3.mira.ui.utils.HighlightUtils.createSourceViewer;
import static org.fortiss.af3.mira.ui.utils.ImageUtils.getImageFile;
import static org.fortiss.af3.project.ui.utils.NewProjectUtils.getDefaultGeneralProjectPath;
import static org.fortiss.af3.project.utils.FileUtils.getDefaultGeneralProjectPath;
import static org.fortiss.tooling.kernel.model.FortissToolingKernelPackage.Literals.INAMED_ELEMENT__NAME;
import static org.fortiss.tooling.kernel.ui.util.DataBindingUtils.bind;
......
......@@ -22,7 +22,7 @@ import static org.eclipse.jface.layout.GridDataFactory.swtDefaults;
import static org.fortiss.af3.mira.ui.utils.ImageUtils.PROJECT_IMAGE_SUBFOLDER;
import static org.fortiss.af3.mira.ui.utils.MiraLayoutUtils.multiLineLabelFactory;
import static org.fortiss.af3.mira.utils.MiraModelElementFactory.createImageItem;
import static org.fortiss.af3.project.ui.utils.NewProjectUtils.getDefaultGeneralProjectPath;
import static org.fortiss.af3.project.utils.FileUtils.getDefaultGeneralProjectPath;
import java.io.File;
import java.io.IOException;
......
ContextUtils.java 273aa06af2c15073bbbdd6f1a8112190732eaa9b GREEN
HighlightUtils.java 9797de10e9c1fd6475bd1eda4d9a55746c17a219 GREEN
ImageUtils.java b87b930301c11cce514b9fb38e148bd00fe60d68 GREEN
ImageUtils.java 9e4c005c0793353ac1b6c6e138f1c1d6a65c393c GREEN
ListenerUtils.java f05728d39167b85752ee577a73e265d2764693f8 GREEN
MiraLayoutUtils.java 0ed0d5731be847edb8454acc27de691ac3ee28e9 GREEN
......@@ -15,7 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.mira.ui.utils;
import static org.fortiss.af3.project.ui.utils.NewProjectUtils.getDefaultGeneralProjectPath;
import static org.fortiss.af3.project.utils.FileUtils.getDefaultGeneralProjectPath;
import static org.fortiss.tooling.base.ui.editpart.ExtendedLayerRootEditPart.LABEL_LAYER;
import java.io.File;
......
ExportProjectUtils.java 95b02d271335e46ce89f78c912f85236fc852988 GREEN
FileNameValidatorUtil.java cb737c96ba0e7e77ae10bb763044b7164353b22a GREEN
FileNameValidatorUtil.java c566595d083e756c20c919458d81e8a91ab0e10e GREEN
FolderOrProjectDialogUtils.java 14823ea1da085d019e21e50703f6f4e3fff8aa83 GREEN
ImportProjectUtils.java 991176c27182bcee524d9f2c742fc5f5b7c050da GREEN
NewProjectUtils.java 408f1a6766e8045fb150e34637999115dedddfd1 GREEN
ImportProjectUtils.java 87216991e47e14846f7affb49139a3dd2a71aba3 GREEN
NewProjectUiUtils.java cd17cec67769d1c62c9923869c43293036d103e4 GREEN
ParsingUtils.java 7bbc27436511ee9d88f8a31f0b19462406d01517 GREEN
......@@ -16,7 +16,7 @@
package org.fortiss.af3.project.ui.utils;
import static org.eclipse.core.resources.ResourcesPlugin.getWorkspace;
import static org.fortiss.af3.project.ui.utils.NewProjectUtils.getDefaultGeneralProjectName;
import static org.fortiss.af3.project.utils.FileUtils.getDefaultGeneralProjectName;
import java.io.File;
import java.util.regex.Pattern;
......
/*-------------------------------------------------------------------------+
| Copyright 2011 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.project.ui.utils;
import java.io.File;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
import org.fortiss.af3.project.storage.LocationProvider;
/**
* Provides methods for creating new AF3 projects.
*
* @author becker
* @author diewald
*/
public class NewProjectUiUtils {
/**
* Asks the user for another filename, if a file with the current name
* already exists.
*
* @param AF3Project
* the current file handler
* @return the new unique name
*/
static public String requestFileNameDialog(File AF3Project) {
String fileName = AF3Project.getName();
fileName = fileName.replace("." + LocationProvider.CURRENT_AF3_PROJECT_FILES_EXTENSION, "");
fileName = fileName.replace(" ", "_");
InputDialog dlg = new InputDialog(Display.getCurrent().getActiveShell(), "",
"The project already exists, please choose a different name", fileName,
new FileNameValidatorUtil());
// If user clicked OK, update the file name to be unique.
if(dlg.open() == Window.OK) {
return dlg.getValue() + "." + LocationProvider.CURRENT_AF3_PROJECT_FILES_EXTENSION;
}
return null;
}
}
/*-------------------------------------------------------------------------+
| Copyright 2011 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.project.ui.utils;
import static org.eclipse.core.resources.ResourcesPlugin.getWorkspace;
import static org.eclipse.emf.common.util.URI.createFileURI;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.jface.dialogs.MessageDialog.openInformation;
import static org.eclipse.ui.PlatformUI.getWorkbench;
import static org.eclipse.ui.ide.undo.WorkspaceUndoUtil.getUIInfoAdapter;
import static org.fortiss.af3.project.utils.FileUtils.AF3_PROJECT_DIRECTORY_NAME;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.info;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import org.eclipse.core.internal.resources.Project;
import org.eclipse.core.internal.resources.Workspace;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.URI;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.ide.undo.CreateProjectOperation;
import org.eclipse.ui.internal.wizards.newresource.ResourceMessages;
import org.fortiss.af3.project.AF3ProjectActivator;
import org.fortiss.af3.project.storage.LocationProvider;
import org.fortiss.af3.project.utils.FileUtils;
/**
* Provides methods for creating new AF3 projects.
*
* @author becker
*/
@SuppressWarnings("restriction")
public class NewProjectUtils {
/** The current workspace root. */
static private final IWorkspaceRoot workspaceRoot = getWorkspace().getRoot();
/** The File handler of the general project. */
static private final File GeneralProject = new File(
workspaceRoot.getLocation() + File.separator + FileUtils.AF3_PROJECT_DIRECTORY_NAME);
/** The default content of a general eclipse project file '.project'. */
// @CodeFormatterOff
static private final String defaultGeneralProjectFile =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<projectDescription>"
+ "<name>"
+ FileUtils.AF3_PROJECT_DIRECTORY_NAME
+ "</name>"
+ "<comment></comment>"
+ "<projects></projects>"
+ "<buildSpec></buildSpec>"
+ "<natures></natures>"
+ "</projectDescription>";
// @CodeFormatterOn
/** General Project. */
static private class GeneralProject extends Project {
/** Constructor. */
protected GeneralProject(IPath path, IWorkspace workspace) {
super(path, (Workspace)workspace);
}
}
/**
* Creates a new General Project (like in the new-wizard "General->Project")
* and adds the project it to the workspace.
*/
static public void createNewGeneralProject() {
String projectPath = GeneralProject.getAbsolutePath();
if(new File(projectPath).isDirectory()) {
info(AF3ProjectActivator.getDefault(),
"Directory '" + projectPath + "' already exists");
return;
}
// Create the project object.
final IProject newProject =
new GeneralProject(new Path(projectPath), workspaceRoot.getWorkspace());
// Get project description.
final IProjectDescription description =
workspaceRoot.getWorkspace().newProjectDescription(newProject.getName());
// Define the operation that stores the project in the file system and
// adds it to the current workspace.
CreateProjectOperation op =
new CreateProjectOperation(description, ResourceMessages.NewProject_windowTitle);
try {
// Execute operation to make project persistent in file system
// (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=219901
// directly execute the operation so that the undo state is
// not preserved. Making this undoable resulted in too many
// accidental file deletions).
op.execute(null/* monitor */, getUIInfoAdapter(Display.getDefault().getActiveShell()));
// If the general project folder was already existent, but it was
// deleted manually from file system, the upper 'op.execute'
// doesn't create the directory again because the project
// information is already in the workspace metadata.
// Hence, we have to reproduce the directory and '.project' file
// manually.
if(!generalProjectExists()) {
GeneralProject.mkdir();
new File(GeneralProject, ".project").createNewFile();
try(FileWriter fstream =
new FileWriter(GeneralProject.getAbsolutePath() + "/.project");
BufferedWriter out = new BufferedWriter(fstream)) {
out.write(defaultGeneralProjectFile);
}
// Refresh the workspace.
workspaceRoot.refreshLocal(IResource.DEPTH_INFINITE, null);
// Refreshing the workspace doesn't help here. The project
// doesn't appear in package explorer, if the general
// project directory was deleted before by hand from file
// system.
// Hence, restart AF3. After that the new projects are shown!
info(AF3ProjectActivator.getDefault(),
"Restarting AF3 in order to be able to show the new project in project explorer.\n" +
"This might be caused by you have probably deleted the AF3 workspace directory manually from file system before?");
openInformation(Display.getDefault().getActiveShell(),
"Problems during project creation",
"You may have deleted the " + AF3_PROJECT_DIRECTORY_NAME +
" manually from file system?" + "\nAF3 restarts to fix problem." +
"\n\nPlease try again after AF3 has been restarted.");
getWorkbench().restart();
}
} catch(Exception e) {
error(AF3ProjectActivator.getDefault(), "Error during creating new project", e);
e.printStackTrace();
openError(Display.getDefault().getActiveShell(), "Error",
"Cannot create general project!");
}
}
/**
* Asks the user for another filename, if a file with the current name
* already exists.
*
* @param AF3Project
* the current file handler
* @return the new unique name
*/
static public String requestFileNameDialog(File AF3Project) {
String fileName = AF3Project.getName();
fileName = fileName.replace("." + LocationProvider.CURRENT_AF3_PROJECT_FILES_EXTENSION, "");
fileName = fileName.replace(" ", "_");
InputDialog dlg = new InputDialog(Display.getCurrent().getActiveShell(), "",
"The project already exists, please choose a different name", fileName,
new FileNameValidatorUtil());
// If user clicked OK, update the file name to be unique.
if(dlg.open() == Window.OK) {
return dlg.getValue() + "." + LocationProvider.CURRENT_AF3_PROJECT_FILES_EXTENSION;
}
return null;
}
/**
* Returns if the general project directory already exists in the workspace
* directory.
*/
static public boolean generalProjectExists() {
return GeneralProject.isDirectory();
}
/**
* Returns the standard name of the general Project directory, containing
* the AF3 Project-files.
*/
static public String getDefaultGeneralProjectName() {
return FileUtils.AF3_PROJECT_DIRECTORY_NAME;
}
/**
* Returns the full path of the general Project directory, containing the
* AF3 Project-files.
*/
static public String getDefaultGeneralProjectPath() {
return GeneralProject.toString();
}
/**
* Returns the URI of the general Project directory, containing the AF3
* Project-files.
*/
static public URI getDefaultGeneralProjectURI() {
return createFileURI(getDefaultGeneralProjectPath());
}
}
NewLibraryWizard.java 34d538b36b03e0541578490d70d64edf4cf1da26 GREEN
NewLibraryWizard.java 9c5ea77e1dd62f864d016321352ae90141634391 GREEN
NewProjectWizard.java 77a6292ff791c55c1abcfc5533fb6544a6488fcb GREEN
......@@ -16,8 +16,8 @@
package org.fortiss.af3.project.ui.wizard;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.fortiss.af3.project.utils.FileUtils.saveFileLibrary;
import static org.fortiss.af3.project.utils.LibraryModelElementFactory.createFileLibrary;
import static org.fortiss.af3.project.utils.ProjectUtils.saveFileLibrary;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
......
AF3Project.java d640d0357cb694cfef043ffdc8ab950024e4b5cd GREEN
AF3ProjectActivator.java c93dfab1a68ff35ed2bf784762ee5c23efd8a16a GREEN
AF3Project.java ddcd98cc9331a8e5f6f6977feb448de2d324a1fe GREEN
AF3ProjectActivator.java b441fa730986dbe6391c7ba2a0484caa51f7acb3 GREEN
......@@ -24,6 +24,10 @@ import org.fortiss.af3.project.typesystem.internal.TypeSystemService;
* @author hoelzl
*/
public final class AF3Project {
/** Defines the suffix of AF3 project files. */
public static final String AF3_PRJ_SUFFIX = "af3_23";
/** Initialize the kernel. */
public static void initialize() {
((TypeSystemService)ITypeSystemService.INSTANCE).initializeService();
......
......@@ -16,6 +16,8 @@
package org.fortiss.af3.project;
import org.eclipse.core.runtime.Plugin;
import org.fortiss.af3.project.cli.AF3ProjectImportHandler;
import org.fortiss.tooling.kernel.service.ICommandLineInterfaceService;
import org.osgi.framework.BundleContext;
/**
......@@ -36,6 +38,9 @@ public class AF3ProjectActivator extends Plugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
ICommandLineInterfaceService cliService = ICommandLineInterfaceService.getInstance();
cliService.registerHandler("--import", new AF3ProjectImportHandler());
}
/** {@inheritDoc} */
......
AF3ProjectImportHandler.java bc30c87f89ec3301ec98de4bc3310eb529b874a4 GREEN
/*-------------------------------------------------------------------------+
| Copyright 2020 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.project.cli;
import static java.io.File.separator;
import static java.util.Arrays.asList;
import static java.util.stream.Collectors.joining;
import static org.apache.commons.lang3.StringUtils.lastIndexOf;
import static org.apache.commons.lang3.StringUtils.substring;
import static org.eclipse.emf.common.util.URI.createFileURI;
import static org.fortiss.af3.project.AF3Project.AF3_PRJ_SUFFIX;
import static org.fortiss.af3.project.utils.FileUtils.getDefaultGeneralProjectURI;
import static org.fortiss.af3.project.utils.ProjectUtils.importFileProject;
import static org.fortiss.tooling.kernel.utils.EMFResourceUtils.refreshWorkspace;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import org.apache.commons.io.filefilter.WildcardFileFilter;
import org.fortiss.af3.project.AF3ProjectActivator;
import org.fortiss.tooling.kernel.extension.ICommandLineSwitchHandler;
/**
* Enables users to import AF3 projects by the command line switch "--import". Projects can be
* single files, a directory containing project files, or a file pattern such as "a/prj*.af3_23".
*
* If an AF3 project with an equivalent name as one of the projects to be imported exists already
* in the runtime workspace, no project is imported.
*
* @author diewald
*/
public class AF3ProjectImportHandler implements ICommandLineSwitchHandler {
/** {@inheritDoc} */
@Override
public boolean hasAdditionalArgument() {
return true;
}
/** {@inheritDoc} */
@Override
public void handleCLISwitch(String argument) {
try {
tryImportProjects(argument);
} catch(IOException e) {
String impErr = "Could not import one or more of the given AF3 projects.";
error(AF3ProjectActivator.getDefault(), impErr, e);
System.out.println(impErr + "\n\n" + e.getMessage());
}
}
/** Returns a collection of {@link File}s that match the given pattern. */
private static Collection<File> getFileList(String importRegExp) {
// If the given path is a directory, collect all AF3 projects in it
File potentialDirectory = new File(importRegExp);
if(potentialDirectory.isDirectory()) {
WildcardFileFilter suffixFilter = new WildcardFileFilter("." + AF3_PRJ_SUFFIX);
return asList(potentialDirectory.listFiles((FileFilter)suffixFilter));
}
// Import files matching the regexp. Supports single files, too.
// NOTE: Operating on strings directly with indices is required to split the input string
// without interpreting it. Otherwise, the windows JDK parts complain due its separator
// choice and missing wildcard support.
int fileSubStrPos = lastIndexOf(importRegExp, separator);
String fileStr = substring(importRegExp, fileSubStrPos + separator.length());
String dirStr = substring(importRegExp, 0, fileSubStrPos);
File importDir = new File(dirStr);
WildcardFileFilter fileFilter =
new WildcardFileFilter(asList(fileStr, "." + AF3_PRJ_SUFFIX));
return asList(importDir.listFiles((FileFilter)fileFilter));
}
/**
* Returns a list of existing project names that match any of the file names (without suffix).
*/
private static Collection<String> getSameProjectNames(Collection<File> importFiles) {
Collection<String> existingProjects = new ArrayList<>();
for(File file : importFiles) {
org.eclipse.emf.common.util.URI targetPath =
getDefaultGeneralProjectURI().appendSegment(file.getName());
File importTargetFile = new File(targetPath.toFileString());
if(importTargetFile.exists()) {
existingProjects.add(importTargetFile.getName());
}
}
return existingProjects;
}
/**
* Imports the AF3 projects from the {@link File}s matching the given path expression. It fails
* with an {@link IOException} if any AF3 project matching the names of the to be imported
* projects already exists in the workspace, or if a lower level {@link IOException} occurs.
*/
private static void tryImportProjects(String locationRegexp) throws IOException {
Collection<File> filesToImport = getFileList(locationRegexp);
// Precondition for import: No equivalently named project may exist in the workspace.
Collection<String> alreadyExistingProjects = getSameProjectNames(filesToImport);
if(!alreadyExistingProjects.isEmpty()) {
String errMsg = "The import failed because some equivalently named projects already" +
" exist in the workspace. The following duplicates were detected:\n";
errMsg += alreadyExistingProjects.stream().collect(joining("\n"));
errMsg += "\nYou can either pass a new workspace location with the switch " +
"\"-data <path-to-ws>\" or clean the existing workspace.";
throw new IOException(errMsg);
}
for(File fileToImport : filesToImport) {
org.eclipse.emf.common.util.URI sourceFileURI = createFileURI(fileToImport.toString());
org.eclipse.emf.common.util.URI targetFileURI =
getDefaultGeneralProjectURI().appendSegment(fileToImport.getName());
importFileProject(sourceFileURI, targetFileURI);
refreshWorkspace();
}
}
}
ExternalFileUtils.java 4171a41060407cd4f19c99fcaf1ebfb9a390134a GREEN
FileUtils.java e2e2c54ae8d2e4b7718e35d27358c798ca5657dc GREEN
FileUtils.java 70e81c85ae7c2d8076e190ebad7eae648451b645 GREEN
FunctionScopeUtils.java 054c92406affa0c0ad8ac7a067de9608d0bbca2b GREEN
LibraryModelElementFactory.java a5a30a0e6b274d220c397d9bf0f14756d49bd19f GREEN
ProjectModelElementFactory.java 2963d3a1fe651025bae3ae4dc0b6e0b77bbaadd5 GREEN
ProjectUtils.java e11d8af800fbda94d017c23b6dd1918c08413b82 GREEN
ProjectUtils.java 921c00a3217dd43fa37dc4497c252fbbeb9211ca GREEN
TypeScopeUtils.java 54f2397f0d6720c90948ccc295f1a63b7319daac GREEN
VariableScopeUtils.java 031591687c2461a990d0534cf4ed4d6df39b1551 GREEN
......@@ -16,27 +16,19 @@
package org.fortiss.af3.project.utils;
import static org.eclipse.core.resources.ResourcesPlugin.getWorkspace;
import static org.fortiss.tooling.kernel.utils.EMFResourceUtils.createNewEclipseWorkspaceProject;
import static org.eclipse.emf.common.util.URI.createFileURI;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import org.eclipse.core.resources.IFile;