diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/.project b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/.project
new file mode 100644
index 00000000..d7b1f309
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/.project
@@ -0,0 +1,17 @@
+
+
+ AsposeCellsEclipseFeature
+
+
+
+
+
+ org.eclipse.pde.FeatureBuilder
+
+
+
+
+
+ org.eclipse.pde.FeatureNature
+
+
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/build.properties b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/build.properties
new file mode 100644
index 00000000..82ab19c6
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/feature.xml b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/feature.xml
new file mode 100644
index 00000000..0203b4f7
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipseFeature/feature.xml
@@ -0,0 +1,52 @@
+
+
+
+
+ Aspose.Cells Maven Project wizard creates Maven Project for using
+Aspose.Cells for Java API within Eclipse IDE.
+"Aspose.Cells for Java is an award-winning Excel Spreadsheet
+component that allows Java developers to embed the ability to
+read, write and manipulate Excel® spreadsheets (XLS, XLSX, XLSM,
+XLSB, XLTX, SpreadsheetML, CSV, ODS), HTML, MHTML, PDF and image
+file formats into their own Java applications without needing
+to rely on Microsoft Excel®.
+With Aspose.Cells for Java developers can export data, format
+spreadsheets to the most granular level, import images, create
+charts, apply and calculate complex formulas, stream Excel® data"
+Aspose.Cells Maven Project wizard fetch and configures the latest
+Maven dependency reference of Aspose.Cells for Java from the
+Aspose Cloud Maven Repository.
+The wizard also gives you option to download the Code Examples
+to use Aspose.Cells for Java API.
+Once you are finished with this wizard - created Maven project
+and downloaded Code Examples. Next you can insert those Code
+Examples to use Aspose.Cells for Java API in your Project from
+File -> New -> Other -> Aspose.Cells Code Example
+The newly created project and the Code Examples you added is
+now ready to be enhanced, all required resources and references
+are also automatically added.
+
+
+
+ The MIT License (MIT)
+Copyright (c) 2001-2016 Aspose Pty Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+
+
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.classpath b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.classpath
new file mode 100644
index 00000000..b1dabee3
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.project b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.project
new file mode 100644
index 00000000..8fe6ea15
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.project
@@ -0,0 +1,28 @@
+
+
+ AsposeCellsEclipsePlugin
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.settings/org.eclipse.jdt.core.prefs b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..11f6e462
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/build.properties b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/build.properties
new file mode 100644
index 00000000..bad26144
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ resources/
+
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/plugin.xml b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/plugin.xml
new file mode 100644
index 00000000..3903da67
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/plugin.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/Aspose.png b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/Aspose.png
new file mode 100644
index 00000000..f2f1b4bf
Binary files /dev/null and b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/Aspose.png differ
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/classpath-template.txt b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/classpath-template.txt
new file mode 100644
index 00000000..fa40bfc1
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/classpath-template.txt
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/long_banner.png b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/long_banner.png
new file mode 100644
index 00000000..c62fa705
Binary files /dev/null and b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/long_banner.png differ
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/org-eclipse-jdt-core.txt b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/org-eclipse-jdt-core.txt
new file mode 100644
index 00000000..bbcbc934
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/org-eclipse-jdt-core.txt
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/pom-xml-template.txt b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/pom-xml-template.txt
new file mode 100644
index 00000000..e5aa7d6b
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/resources/pom-xml-template.txt
@@ -0,0 +1,20 @@
+
+
+ 4.0.0
+ com.mycompany
+ mavenproject1
+ 2
+ jar
+
+
+ Aspose-Maven-Repository
+ Aspose Maven Repository
+ http://maven.aspose.com/artifactory/simple/ext-release-local/
+
+
+
+ UTF-8
+ 1.7
+ 1.7
+
+
\ No newline at end of file
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/Activator.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/Activator.java
new file mode 100644
index 00000000..977bff68
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/Activator.java
@@ -0,0 +1,80 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.cells;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "AsposeCellsEclipsePlugin";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ public static String getResourceFilePath(String resourceFileName) {
+ String fileURL = null;
+ try {
+ URL url = getDefault().getBundle().getEntry("resources/" + resourceFileName);
+ fileURL = FileLocator.toFileURL(url).toURI().normalize().getPath();
+ } catch (IOException | URISyntaxException e) {
+ e.printStackTrace();
+ }
+ return fileURL;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.
+ * BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.
+ * BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/MavenSettings.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/MavenSettings.java
new file mode 100644
index 00000000..86743bf1
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/MavenSettings.java
@@ -0,0 +1,85 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.cells;
+
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
+/**
+ *
+ * @author Adeel
+ */
+public final class MavenSettings {
+
+ private static final String PROP_LAST_ARCHETYPE_GROUPID = "lastArchetypeGroupId";
+ private static final String PROP_LAST_ARCHETYPE_VERSION = "lastArchetypeVersion";
+
+ private IEclipsePreferences getPreferences() {
+ return InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID);
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getLastArchetypeGroupId() {
+ return getPreferences().get(PROP_LAST_ARCHETYPE_GROUPID, "com.mycompany");
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getLastArchetypeVersion() {
+ return getPreferences().get(PROP_LAST_ARCHETYPE_VERSION, "1.0-SNAPSHOT");
+ }
+
+ /**
+ *
+ * @param version
+ */
+ public void setLastArchetypeVersion(String version) {
+ putProperty(PROP_LAST_ARCHETYPE_VERSION, version);
+ }
+
+ /**
+ *
+ * @param groupId
+ */
+ public void setLastArchetypeGroupId(String groupId) {
+ putProperty(PROP_LAST_ARCHETYPE_GROUPID, groupId);
+ }
+
+ private String putProperty(String key, String value) {
+ String retval = getProperty(key);
+ if (value != null) {
+ getPreferences().put(key, value);
+ } else {
+ getPreferences().remove(key);
+ }
+ return retval;
+ }
+ private static final MavenSettings INSTANCE = new MavenSettings();
+
+ /**
+ *
+ * @return
+ */
+ public static MavenSettings getDefault() {
+ return INSTANCE;
+ }
+
+ private String getProperty(String key) {
+ return getPreferences().get(key, null);
+ }
+
+}
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectSupport.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectSupport.java
new file mode 100644
index 00000000..c36a321e
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectSupport.java
@@ -0,0 +1,158 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.cells.maven;
+
+import java.net.URI;
+import java.nio.file.Files;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import com.aspose.cells.Activator;
+import com.aspose.cells.maven.utils.AsposeJavaAPI;
+import com.aspose.cells.maven.utils.AsposeMavenProjectManager;
+import com.aspose.cells.maven.utils.AsposeCellsJavaAPI;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+public class AsposeMavenProjectSupport implements IRunnableWithProgress {
+
+ private String projectName;
+ private URI location;
+ private String packageName;
+ private boolean downloadExamples;
+ private String version;
+ private String groupId;
+
+ public AsposeMavenProjectSupport(String projectName, URI location, String packageName, boolean downloadExamples,
+ String version, String groupId) {
+ this.projectName = projectName;
+ this.location = location;
+ this.packageName = packageName;
+ this.downloadExamples = downloadExamples;
+ this.version = version;
+ this.groupId = groupId;
+ }
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ monitor.beginTask("Processing...", IProgressMonitor.UNKNOWN);
+ createProject(monitor);
+ monitor.done();
+ }
+
+ private IProject createProject(IProgressMonitor monitor) {
+ IProject project = createBaseProject(projectName, location);
+ try {
+ monitor.setTaskName("Creating project...");
+ String[] paths = { "src/main/java/" + packageName.replace(".", "/"), "src/test/java", "src/main/resources" };
+ addToProjectStructure(project, paths);
+
+ Files.copy(new File(Activator.getResourceFilePath("pom-xml-template.txt")).toPath(),
+ new File(location.getPath() + "/pom.xml").toPath());
+ Files.copy(new File(Activator.getResourceFilePath("classpath-template.txt")).toPath(),
+ new File(location.getPath() + "/.classpath").toPath());
+
+ Files.createDirectories(new File(location.getPath() + "/.settings").toPath());
+ Files.copy(new File(Activator.getResourceFilePath("org-eclipse-jdt-core.txt")).toPath(),
+ new File(location.getPath() + "/.settings/org.eclipse.jdt.core.prefs").toPath());
+
+ AsposeMavenProjectManager asposeMavenProjectManager = AsposeMavenProjectManager
+ .initialize(new File(location));
+ asposeMavenProjectManager.configureProjectMavenPOM(groupId, projectName, version);
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+
+ if (downloadExamples) {
+ monitor.setTaskName("Downloading code examples...");
+ AsposeMavenProjectManager.initialize(new File(location));
+ AsposeJavaAPI component = AsposeCellsJavaAPI.initialize(AsposeMavenProjectManager.getInstance());
+ component.checkAndUpdateRepo();
+ }
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ project = null;
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return project;
+ }
+
+ private IProject createBaseProject(String projectName, URI location) {
+ IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ String natures[] = { "org.eclipse.jdt.core.javanature", "org.eclipse.m2e.core.maven2Nature" };
+
+ if (!newProject.exists()) {
+ URI projectLocation = location;
+ IProjectDescription desc = newProject.getWorkspace().newProjectDescription(newProject.getName());
+
+ ICommand commandJavaBuilder = (ICommand) desc.newCommand();
+ ICommand commandMaven2Builder = (ICommand) desc.newCommand();
+ commandJavaBuilder.setBuilderName("org.eclipse.jdt.core.javabuilder");
+ commandMaven2Builder.setBuilderName("org.eclipse.m2e.core.maven2Builder");
+ ICommand buildspecs[] = { commandJavaBuilder, commandMaven2Builder };
+
+ desc.setBuildSpec(buildspecs);
+ desc.setNatureIds(natures);
+
+ if (location != null && ResourcesPlugin.getWorkspace().getRoot().getLocationURI().equals(location)) {
+ projectLocation = null;
+ }
+
+ desc.setLocationURI(projectLocation);
+ try {
+ newProject.create(desc, null);
+ if (!newProject.isOpen()) {
+ newProject.open(null);
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ return newProject;
+ }
+
+ private void createFolder(IFolder folder) throws CoreException {
+ IContainer parent = folder.getParent();
+ if (parent instanceof IFolder) {
+ createFolder((IFolder) parent);
+ }
+ if (!folder.exists()) {
+ folder.create(false, true, null);
+ }
+ }
+
+ /**
+ * Create a folder structure with a parent root, overlay, and a few child
+ * folders.
+ *
+ * @param newProject
+ * @param paths
+ * @throws CoreException
+ */
+ private void addToProjectStructure(IProject newProject, String[] paths) throws CoreException {
+ for (String path : paths) {
+ IFolder etcFolders = newProject.getFolder(path);
+ createFolder(etcFolders);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectWizard.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectWizard.java
new file mode 100644
index 00000000..71a2c149
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectWizard.java
@@ -0,0 +1,54 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.cells.maven;
+
+import java.lang.reflect.InvocationTargetException;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+public class AsposeMavenProjectWizard extends Wizard implements INewWizard {
+
+ private AsposeMavenProjectWizardPage wizardPage;
+
+ public AsposeMavenProjectWizard() {
+ setWindowTitle("Aspose.Cells Maven Project");
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ wizardPage = new AsposeMavenProjectWizardPage();
+ addPage(wizardPage);
+ }
+
+ @Override
+ public boolean performFinish() {
+ AsposeMavenProjectSupport asposeMavenProjectSupport = new AsposeMavenProjectSupport(wizardPage.getProjectName(),
+ wizardPage.getLocationURI(), wizardPage.getPackageName(), wizardPage.isDownloadExamplesChecked(),
+ wizardPage.getVersion(), wizardPage.getGroupId());
+ try {
+ new ProgressMonitorDialog(this.getShell()).run(true, false, asposeMavenProjectSupport);
+ } catch (InvocationTargetException | InterruptedException e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+}
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectWizardPage.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectWizardPage.java
new file mode 100644
index 00000000..a2247c58
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/AsposeMavenProjectWizardPage.java
@@ -0,0 +1,370 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.cells.maven;
+
+import java.io.File;
+import java.net.URI;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wb.swt.SWTResourceManager;
+import com.aspose.cells.Activator;
+import com.aspose.cells.maven.utils.MavenSettings;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+
+public class AsposeMavenProjectWizardPage extends WizardPage {
+
+ public static final String PROP_PROJECT_NAME = "projectName";
+ public static final String PROP_GROUP_ID = "groupId";
+
+ private Text txtProjectLocation;
+ private Text txtProjectName;
+ private Text txtProjectFolder;
+ private Text txtArtifactId;
+ private Text txtGroupId;
+ private Text txtVersion;
+ private Text txtPackage;
+ private Button chkDownloadExamples;
+
+ private ControlDecoration txtProjectNameDecoration;
+ private ControlDecoration txtProjectLocationDecoration;
+ private ControlDecoration txtGroupIdDecoration;
+ private ControlDecoration txtVersionDecoration;
+ private ControlDecoration txtProjectFolderDecoration;
+ private ControlDecoration txtPackageDecoration;
+
+ /**
+ * Create the wizard.
+ */
+ public AsposeMavenProjectWizardPage() {
+ super("wizardPage");
+ setTitle("New Project");
+ setDescription("Name and Location");
+ }
+
+ private String getDefaultProjectName() {
+ String defaultName = "asposemavenproject";
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ try {
+ for (int i = 1; i < 100; i++) {
+
+ boolean match = false;
+ for (IProject project : projects) {
+ if (project.getDescription().getName().equals(defaultName + i)) {
+ match = true;
+ break;
+ }
+
+ }
+ if (!match) {
+ defaultName = defaultName + i;
+ break;
+ }
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ return defaultName;
+ }
+
+ private void initControls() {
+ txtGroupId.setText(MavenSettings.getDefault().getLastArchetypeGroupId());
+ txtVersion.setText(MavenSettings.getDefault().getLastArchetypeVersion());
+ txtProjectName.setText(getDefaultProjectName());
+ txtProjectName.setSelection(txtProjectName.getCharCount());
+ txtProjectLocation.setText(ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString());
+ txtProjectFolder.setText(txtProjectLocation.getText() + File.separator + txtProjectName.getText());
+ txtArtifactId.setText(txtProjectName.getText());
+ txtPackage.setText(txtGroupId.getText() + "." + txtProjectName.getText());
+ }
+
+ private void initDecorators() {
+ FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault()
+ .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+
+ txtProjectNameDecoration = new ControlDecoration(txtProjectName, SWT.TOP | SWT.RIGHT);
+ txtProjectNameDecoration.setImage(fieldDecoration.getImage());
+ txtProjectNameDecoration.hide();
+
+ txtProjectLocationDecoration = new ControlDecoration(txtProjectLocation, SWT.TOP | SWT.RIGHT);
+ txtProjectLocationDecoration.setImage(fieldDecoration.getImage());
+ txtProjectLocationDecoration.hide();
+
+ txtGroupIdDecoration = new ControlDecoration(txtGroupId, SWT.TOP | SWT.RIGHT);
+ txtGroupIdDecoration.setImage(fieldDecoration.getImage());
+ txtGroupIdDecoration.hide();
+
+ txtVersionDecoration = new ControlDecoration(txtVersion, SWT.TOP | SWT.RIGHT);
+ txtVersionDecoration.setImage(fieldDecoration.getImage());
+ txtVersionDecoration.hide();
+
+ txtProjectFolderDecoration = new ControlDecoration(txtProjectFolder, SWT.TOP | SWT.RIGHT);
+ txtProjectFolderDecoration.setImage(fieldDecoration.getImage());
+ txtProjectFolderDecoration.hide();
+
+ txtPackageDecoration = new ControlDecoration(txtPackage, SWT.TOP | SWT.RIGHT);
+ txtPackageDecoration.setImage(fieldDecoration.getImage());
+ txtPackageDecoration.hide();
+ }
+
+ private void onProjectNameChange() {
+ txtProjectNameDecoration.hide();
+ setPageComplete(true);
+ if (txtProjectName.getText().trim().length() == 0) {
+ txtProjectNameDecoration.setDescriptionText("Project Name is not a valid folder name");
+ txtProjectNameDecoration.show();
+ setPageComplete(false);
+ }
+ txtProjectFolder.setText(txtProjectLocation.getText() + File.separator + txtProjectName.getText());
+ txtArtifactId.setText(txtProjectName.getText());
+ txtPackage.setText("com.mycompany." + txtProjectName.getText());
+ }
+
+ private void onProjectLocationChange() {
+ txtProjectLocationDecoration.hide();
+ setPageComplete(true);
+ if (!new File(txtProjectLocation.getText().trim()).isDirectory()) {
+ txtProjectLocationDecoration.setDescriptionText("Project Folder is not a valid path");
+ txtProjectLocationDecoration.show();
+ setPageComplete(false);
+ }
+ txtProjectFolder.setText(txtProjectLocation.getText() + File.separator + txtProjectName.getText());
+ }
+
+ private void onVersionChange() {
+ txtVersionDecoration.hide();
+ setPageComplete(true);
+ if (txtVersion.getText().trim().length() == 0) {
+ txtVersionDecoration.setDescriptionText("Version may not be empty");
+ txtVersionDecoration.show();
+ setPageComplete(false);
+ }
+ }
+
+ private void onPackageChange() {
+ txtPackageDecoration.hide();
+ setPageComplete(true);
+ String packageName = txtPackage.getText().trim();
+ if (!(packageName.equals("")
+ || packageName.matches("([\\p{L}_$][\\p{L}\\p{N}_$]*\\.)*[\\p{L}_$][\\p{L}\\p{N}_$]*"))) {
+ txtPackageDecoration.setDescriptionText("Package may not be empty");
+ txtPackageDecoration.show();
+ setPageComplete(false);
+ }
+ }
+
+ private void onGroupIdChange() {
+ txtGroupIdDecoration.hide();
+ setPageComplete(true);
+ if (txtGroupId.getText().trim().length() == 0) {
+ txtGroupIdDecoration.setDescriptionText("GroupdId may not be empty");
+ txtGroupIdDecoration.show();
+ setPageComplete(false);
+ }
+ txtPackage.setText(txtGroupId.getText() + "." + txtProjectName.getText());
+ }
+
+ private void onProjectFolderChange() {
+ txtProjectFolderDecoration.hide();
+ setPageComplete(true);
+ File projLoc = new File(
+ (new File(txtProjectLocation.getText()).getAbsoluteFile()).toURI().normalize().getPath());
+ File destFolder = new File(
+ (new File(txtProjectFolder.getText()).getAbsoluteFile()).toURI().normalize().getPath());
+
+ while (projLoc != null && !projLoc.exists()) {
+ projLoc = projLoc.getParentFile();
+ }
+ if (projLoc == null || !projLoc.canWrite()) {
+ txtProjectFolderDecoration.setDescriptionText("Project Folder cannot be created");
+ txtProjectFolderDecoration.show();
+ setPageComplete(false);
+ } else {
+ File[] kids = destFolder.listFiles();
+ if (destFolder.exists() && kids != null && kids.length > 0) {
+ txtProjectFolderDecoration.setDescriptionText("Project Folder already exists and is not empty");
+ txtProjectFolderDecoration.show();
+ setPageComplete(false);
+ }
+ }
+ }
+
+ public String getProjectName() {
+ return txtProjectName.getText();
+ }
+
+ public String getPackageName() {
+ return txtPackage.getText();
+ }
+
+ public URI getLocationURI() {
+ return new File(txtProjectFolder.getText()).toURI();
+ }
+
+ public String getVersion() {
+ return txtVersion.getText();
+ }
+
+ public String getGroupId() {
+ return txtGroupId.getText();
+ }
+
+ public boolean isDownloadExamplesChecked() {
+ return chkDownloadExamples.getSelection();
+ }
+
+ /**
+ * Create contents of the wizard.
+ *
+ * @param parent
+ */
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+
+ setControl(container);
+
+ Label lblNewLabel = new Label(container, SWT.NONE);
+ lblNewLabel.setImage(SWTResourceManager.getImage(Activator.getResourceFilePath("long_banner.png")));
+ lblNewLabel.setBounds(10, 0, 500, 80);
+
+ Label lblPleaseEnterProject = new Label(container, SWT.NONE);
+ lblPleaseEnterProject.setFont(SWTResourceManager.getFont("Segoe UI", 9, SWT.BOLD));
+ lblPleaseEnterProject.setBounds(5, 98, 179, 15);
+ lblPleaseEnterProject.setText("Please enter project detail:");
+
+ Label lblPleaseEnterMaven = new Label(container, SWT.NONE);
+ lblPleaseEnterMaven.setText("Please enter maven artifact detail:");
+ lblPleaseEnterMaven.setFont(SWTResourceManager.getFont("Segoe UI", 9, SWT.BOLD));
+ lblPleaseEnterMaven.setBounds(5, 194, 213, 15);
+
+ Label lblProjectName = new Label(container, SWT.NONE);
+ lblProjectName.setBounds(5, 118, 84, 15);
+ lblProjectName.setText("Project Name:");
+
+ Label lblProjectLocation = new Label(container, SWT.NONE);
+ lblProjectLocation.setBounds(5, 146, 94, 15);
+ lblProjectLocation.setText("Project Location:");
+
+ Label lblProjectFolder = new Label(container, SWT.NONE);
+ lblProjectFolder.setText("Project Folder:");
+ lblProjectFolder.setBounds(5, 173, 94, 15);
+
+ Label lblArtifactId = new Label(container, SWT.NONE);
+ lblArtifactId.setText("Artifact Id:");
+ lblArtifactId.setBounds(5, 215, 94, 15);
+
+ Label lblGroupId = new Label(container, SWT.NONE);
+ lblGroupId.setText("Group Id:");
+ lblGroupId.setBounds(5, 242, 94, 15);
+
+ Label lblVersion = new Label(container, SWT.NONE);
+ lblVersion.setText("Version:");
+ lblVersion.setBounds(5, 270, 94, 15);
+
+ Label lblPackage = new Label(container, SWT.NONE);
+ lblPackage.setText("Package:");
+ lblPackage.setBounds(5, 296, 94, 15);
+
+ txtProjectName = new Text(container, SWT.BORDER);
+ txtProjectName.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ onProjectNameChange();
+ }
+ });
+ txtProjectName.setBounds(118, 116, 319, 21);
+
+ txtProjectLocation = new Text(container, SWT.BORDER);
+ txtProjectLocation.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ onProjectLocationChange();
+ }
+ });
+ txtProjectLocation.setBounds(118, 143, 319, 21);
+
+ Button btnNewButton = new Button(container, SWT.NONE);
+ btnNewButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ DirectoryDialog dialog = new DirectoryDialog(new Shell(), SWT.NULL);
+ String path = dialog.open();
+ if (path != null) {
+ txtProjectLocation.setText(path);
+ }
+ }
+ });
+ btnNewButton.setBounds(443, 141, 75, 25);
+ btnNewButton.setText("Browse...");
+
+ txtProjectFolder = new Text(container, SWT.BORDER);
+ txtProjectFolder.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ onProjectFolderChange();
+ }
+ });
+ txtProjectFolder.setEditable(false);
+ txtProjectFolder.setBounds(118, 170, 319, 21);
+
+ txtArtifactId = new Text(container, SWT.BORDER);
+ txtArtifactId.setEnabled(false);
+ txtArtifactId.setEditable(false);
+ txtArtifactId.setBounds(118, 212, 319, 21);
+
+ txtGroupId = new Text(container, SWT.BORDER);
+ txtGroupId.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ onGroupIdChange();
+ }
+ });
+ txtGroupId.setBounds(118, 239, 319, 21);
+
+ txtVersion = new Text(container, SWT.BORDER);
+ txtVersion.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ onVersionChange();
+ }
+ });
+ txtVersion.setBounds(118, 266, 319, 21);
+
+ txtPackage = new Text(container, SWT.BORDER);
+ txtPackage.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ onPackageChange();
+ }
+ });
+ txtPackage.setBounds(118, 293, 319, 21);
+
+ chkDownloadExamples = new Button(container, SWT.CHECK);
+ chkDownloadExamples.setBounds(5, 325, 492, 16);
+ chkDownloadExamples.setText("Also Download Code Examples (for using Aspose.Cells for Java)");
+
+ Label lblNewLabel_1 = new Label(container, SWT.NONE);
+ lblNewLabel_1.setBounds(443, 296, 55, 15);
+ lblNewLabel_1.setText("(Optional)");
+
+ initDecorators();
+ initControls();
+ }
+}
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/Metadata.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/Metadata.java
new file mode 100644
index 00000000..5a945712
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/Metadata.java
@@ -0,0 +1,362 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2014.09.26 at 03:01:37 PM PKT
+//
+package com.aspose.cells.maven.artifacts;
+
+import javax.xml.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * Java class for anonymous complex type.
+ *
+ *
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <
+ * pre>
+ * <complexType> <complexContent> <restriction
+ * base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element
+ * name="groupId" type="{http://www.w3.org/2001/XMLSchema}string"/> <element
+ * name="artifactId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="version" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="versioning"> <complexType> <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence> <element name="latest"
+ * type="{http://www.w3.org/2001/XMLSchema}string"/> <element name="release"
+ * type="{http://www.w3.org/2001/XMLSchema}string"/> <element
+ * name="versions"> <complexType> <complexContent> <restriction
+ * base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element
+ * name="version" type="{http://www.w3.org/2001/XMLSchema}string"
+ * maxOccurs="unbounded" minOccurs="0"/> </sequence> </restriction>
+ * </complexContent> </complexType> </element> <element
+ * name="lastUpdated" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * </sequence> </restriction> </complexContent> </complexType>
+ * </element> </sequence> </restriction> </complexContent>
+ * </complexType>
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "groupId",
+ "artifactId",
+ "version",
+ "versioning",
+ "classifier"
+})
+@XmlRootElement(name = "metadata")
+public class Metadata {
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String groupId;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String artifactId;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String version;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected Metadata.Versioning versioning;
+
+ /**
+ *
+ */
+ protected String classifier;
+
+ /**
+ * Gets the value of the groupId property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getGroupId() {
+ return groupId;
+ }
+
+ /**
+ * Sets the value of the groupId property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setGroupId(String value) {
+ this.groupId = value;
+ }
+
+ /**
+ * Gets the value of the artifactId property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ /**
+ * Sets the value of the artifactId property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setArtifactId(String value) {
+ this.artifactId = value;
+ }
+
+ /**
+ * Gets the value of the version property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * Sets the value of the version property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setVersion(String value) {
+ this.version = value;
+ }
+
+ /**
+ * Gets the value of the versioning property.
+ *
+ * @return possible object is {@link Metadata.Versioning }
+ */
+ public Metadata.Versioning getVersioning() {
+ return versioning;
+ }
+
+ /**
+ * Sets the value of the versioning property.
+ *
+ * @param value allowed object is {@link Metadata.Versioning }
+ */
+ public void setVersioning(Metadata.Versioning value) {
+ this.versioning = value;
+ }
+
+ /**
+ *
+ * Java class for anonymous complex type.
+ *
+ *
+ * The following schema fragment specifies the expected content contained
+ * within this class.
+ *
+ * <
+ * pre>
+ * <complexType> <complexContent> <restriction
+ * base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence>
+ * <element name="latest"
+ * type="{http://www.w3.org/2001/XMLSchema}string"/> <element
+ * name="release" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="versions"> <complexType> <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence> <element name="version"
+ * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"
+ * minOccurs="0"/> </sequence> </restriction> </complexContent>
+ * </complexType> </element> <element name="lastUpdated"
+ * type="{http://www.w3.org/2001/XMLSchema}long"/> </sequence>
+ * </restriction> </complexContent> </complexType>
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "latest",
+ "release",
+ "versions",
+ "lastUpdated"
+ })
+ public static class Versioning {
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String latest;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String release;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected Metadata.Versioning.Versions versions;
+
+ /**
+ *
+ */
+ protected long lastUpdated;
+
+ /**
+ * Gets the value of the latest property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getLatest() {
+ return latest;
+ }
+
+ /**
+ * Sets the value of the latest property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setLatest(String value) {
+ this.latest = value;
+ }
+
+ /**
+ * Gets the value of the release property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getRelease() {
+ return release;
+ }
+
+ /**
+ * Sets the value of the release property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setRelease(String value) {
+ this.release = value;
+ }
+
+ /**
+ * Gets the value of the versions property.
+ *
+ * @return possible object is {@link Metadata.Versioning.Versions }
+ */
+ public Metadata.Versioning.Versions getVersions() {
+ return versions;
+ }
+
+ /**
+ * Sets the value of the versions property.
+ *
+ * @param value allowed object is {@link Metadata.Versioning.Versions }
+ */
+ public void setVersions(Metadata.Versioning.Versions value) {
+ this.versions = value;
+ }
+
+ /**
+ * Gets the value of the lastUpdated property.
+ * @return
+ */
+ public long getLastUpdated() {
+ return lastUpdated;
+ }
+
+ /**
+ * Sets the value of the lastUpdated property.
+ * @param value
+ */
+ public void setLastUpdated(long value) {
+ this.lastUpdated = value;
+ }
+
+ /**
+ *
+ * Java class for anonymous complex type.
+ *
+ *
+ * The following schema fragment specifies the expected content
+ * contained within this class.
+ *
+ * <
+ * pre>
+ * <complexType> <complexContent> <restriction
+ * base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence>
+ * <element name="version"
+ * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"
+ * minOccurs="0"/> </sequence> </restriction> </complexContent>
+ * </complexType>
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "version"
+ })
+ public static class Versions {
+
+ /**
+ *
+ */
+ protected List version;
+
+ /**
+ * Gets the value of the version property.
+ *
+ *
+ * This accessor method returns a reference to the live list, not a
+ * snapshot. Therefore any modification you make to the returned
+ * list will be present inside the JAXB object. This is why there is
+ * not a set method for the version property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getVersion().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ * @return
+ */
+ public List getVersion() {
+ if (version == null) {
+ version = new ArrayList();
+ }
+ return this.version;
+ }
+
+ }
+
+ }
+
+ /**
+ * Gets the value of the classifier property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getClassifier() {
+ return classifier;
+ }
+
+ /**
+ * Sets the value of the version property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setClassifier(String value) {
+ this.classifier = value;
+ }
+
+}
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/ObjectFactory.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/ObjectFactory.java
new file mode 100644
index 00000000..6788b329
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/ObjectFactory.java
@@ -0,0 +1,55 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2014.09.26 at 03:01:37 PM PKT
+//
+package com.aspose.cells.maven.artifacts;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+/**
+ * This object contains factory methods for each Java content interface and Java
+ * element interface generated in the com.aspose.maven.artifacts package.
+ *
+ * An ObjectFactory allows you to programatically construct new instances of the
+ * Java representation for XML content. The Java representation of XML content
+ * can consist of schema derived interfaces and classes representing the binding
+ * of schema type definitions, element declarations and model groups. Factory
+ * methods for each of these are provided in this class.
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of
+ * schema derived classes for package: com.aspose.maven.apis.artifacts
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link Metadata.Versioning.Versions }
+ * @return
+ */
+ public Metadata.Versioning.Versions createMetadataVersioningVersions() {
+ return new Metadata.Versioning.Versions();
+ }
+
+ /**
+ * Create an instance of {@link Metadata }
+ * @return
+ */
+ public Metadata createMetadata() {
+ return new Metadata();
+ }
+
+ /**
+ * Create an instance of {@link Metadata.Versioning }
+ * @return
+ */
+ public Metadata.Versioning createMetadataVersioning() {
+ return new Metadata.Versioning();
+ }
+
+}
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/maven-metada.xml b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/maven-metada.xml
new file mode 100644
index 00000000..1df59945
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/maven-metada.xml
@@ -0,0 +1,17 @@
+
+
+ com.aspose
+ aspose-cells
+ 14.5.0
+
+ 14.8.0
+ 14.8.0
+
+ 14.5.0
+ 14.6.0
+ 14.7.0
+ 14.8.0
+
+ 20140924084136
+
+
\ No newline at end of file
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/maven-metadata.xsd b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/maven-metadata.xsd
new file mode 100644
index 00000000..6e3d358e
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/artifacts/maven-metadata.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleSupport.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleSupport.java
new file mode 100644
index 00000000..06a75343
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleSupport.java
@@ -0,0 +1,96 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.cells.maven.examples;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+
+import org.apache.commons.io.FileUtils;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.w3c.dom.NodeList;
+import com.aspose.cells.maven.utils.AsposeConstants;
+import com.aspose.cells.maven.utils.AsposeMavenProjectManager;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+public class AsposeExampleSupport implements IRunnableWithProgress {
+
+ private String selectedProjectPath;
+ private String exampleCategory;
+ private IProject project;
+
+ final private static String localExampleFolder = "aspose/GitConsRepos/Aspose.Cells/Examples";
+ final private static String localExampleSourceFolder = "src/main/java/com/aspose/cells/examples";
+ final private static String localExampleResourceFolder = "src/main/resources/com/aspose/cells/examples";
+
+ public AsposeExampleSupport(String selectedProjectPath, String exampleCategory, IProject project) {
+ this.selectedProjectPath = selectedProjectPath;
+ this.exampleCategory = exampleCategory;
+ this.project = project;
+ }
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ monitor.beginTask("Adding example code in project " + project.getName() + "...", IProgressMonitor.UNKNOWN);
+ createExample();
+ monitor.done();
+ }
+
+ public void createExample() {
+ String srcExamplePath = System.getProperty("user.home") + File.separator + localExampleFolder + File.separator
+ + localExampleSourceFolder;
+ String srcExampleResourcePath = System.getProperty("user.home") + File.separator + localExampleFolder
+ + File.separator + localExampleResourceFolder;
+
+ String destProjectExamplePath = selectedProjectPath + File.separator + localExampleSourceFolder;
+ String destProjectExampleResourcePath = selectedProjectPath + File.separator + localExampleResourceFolder;
+
+ File srcExampleCategoryPath = new File(srcExamplePath + File.separator + exampleCategory);
+ File destExampleCategoryPath = new File(destProjectExamplePath + File.separator + exampleCategory);
+
+ Path srcUtil = new File(srcExamplePath + File.separator + "Utils.java").toPath();
+ Path destUtil = new File(destProjectExamplePath + File.separator + "Utils.java").toPath();
+
+ File srcExampleResourceCategoryPath = new File(srcExampleResourcePath + File.separator + exampleCategory);
+ File destExampleResourceCategoryPath = new File(
+ destProjectExampleResourcePath + File.separator + exampleCategory);
+
+ String repositoryPOM_XML = System.getProperty("user.home") + File.separator + localExampleFolder
+ + File.separator + AsposeConstants.MAVEN_POM_XML;
+
+ try {
+ FileUtils.copyDirectory(srcExampleCategoryPath, destExampleCategoryPath);
+ Files.copy(srcUtil, destUtil, StandardCopyOption.REPLACE_EXISTING);
+ FileUtils.copyDirectory(srcExampleResourceCategoryPath, destExampleResourceCategoryPath);
+
+ NodeList examplesNoneAsposeDependencies = AsposeMavenProjectManager.getInstance()
+ .getDependenciesFromPOM(repositoryPOM_XML, AsposeConstants.ASPOSE_GROUP_ID);
+ AsposeMavenProjectManager.getInstance().addMavenDependenciesInProject(examplesNoneAsposeDependencies);
+
+ NodeList examplesNoneAsposeRepositories = AsposeMavenProjectManager.getInstance()
+ .getRepositoriesFromPOM(repositoryPOM_XML, AsposeConstants.ASPOSE_MAVEN_REPOSITORY);
+ AsposeMavenProjectManager.getInstance().addMavenRepositoriesInProject(examplesNoneAsposeRepositories);
+
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+
+ } catch (IOException | CoreException e) {
+ e.printStackTrace();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleWizard.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleWizard.java
new file mode 100644
index 00000000..513161a6
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleWizard.java
@@ -0,0 +1,61 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.cells.maven.examples;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+public class AsposeExampleWizard extends Wizard implements INewWizard {
+
+ private AsposeExampleWizardPage wizardPage;
+
+ public AsposeExampleWizard() {
+ setWindowTitle("Aspose.Cells Code Example");
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ wizardPage = new AsposeExampleWizardPage();
+ addPage(wizardPage);
+ }
+
+ @Override
+ public boolean performFinish() {
+
+ String selectedProjectPath = wizardPage.getSelectedProjectPath();
+ String exampleCategory = wizardPage.getSelectedExampleCategory();
+ IProject project = wizardPage.getIProject();
+
+ AsposeExampleSupport asposeExampleSupport = new AsposeExampleSupport(selectedProjectPath, exampleCategory,
+ project);
+ try {
+ new ProgressMonitorDialog(this.getShell()).run(true, false, asposeExampleSupport);
+ } catch (InvocationTargetException | InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ return true;
+ }
+
+}
diff --git a/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleWizardPage.java b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleWizardPage.java
new file mode 100644
index 00000000..bd8c7245
--- /dev/null
+++ b/Plugins/Aspose-Cells-Java-for-Eclipse(Maven)/AsposeCellsEclipsePlugin/src/com/aspose/cells/maven/examples/AsposeExampleWizardPage.java
@@ -0,0 +1,307 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.cells.maven.examples;
+
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.util.LinkedList;
+import java.util.Queue;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.wb.swt.SWTResourceManager;
+import com.aspose.cells.Activator;
+import com.aspose.cells.maven.utils.AsposeConstants;
+import com.aspose.cells.maven.utils.AsposeJavaAPI;
+import com.aspose.cells.maven.utils.AsposeMavenProjectManager;
+import com.aspose.cells.maven.utils.AsposeCellsJavaAPI;
+import com.aspose.cells.maven.utils.FormatExamples;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.ModifyEvent;
+
+public class AsposeExampleWizardPage extends WizardPage {
+
+ private Combo cbProject;
+ private Combo cbVersion;
+ private Tree examplesTree;
+
+ private ControlDecoration cbProjectDecoration;
+ private ControlDecoration cbVersionDecoration;
+ private ControlDecoration examplesTreeDecoration;
+
+ /**
+ * Create the wizard.
+ */
+ public AsposeExampleWizardPage() {
+ super("wizardPage");
+ setTitle("New Aspose.Cells Code Example");
+ setDescription("Aspose.Cells Java API - Code Examples");
+ }
+
+ public IProject getIProject() {
+ return (IProject) cbProject.getData(cbProject.getText());
+ }
+
+ public String getSelectedProjectPath() {
+ String projectPath = null;
+ try {
+ IProject project = (IProject) cbProject.getData(cbProject.getText());
+ projectPath = project.getDescription().getLocationURI().getPath();
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ return projectPath;
+ }
+
+ public String getSelectedProjectName() {
+ return cbProject.getText();
+ }
+
+ public String getSelectedExampleCategory() {
+ TreeItem selectedTreeItem = examplesTree.getSelection()[0];
+ String selectedCategory = selectedTreeItem.getText().trim().replace(' ', '_').toLowerCase();
+
+ while (selectedTreeItem.getParentItem().getParentItem() != null) {
+ selectedTreeItem = selectedTreeItem.getParentItem();
+ selectedCategory = selectedTreeItem.getText().trim().replace(' ', '_').toLowerCase() + "/"
+ + selectedCategory;
+ }
+ return selectedCategory;
+ }
+
+ private void downloadExamplesRepo() {
+ // download code examples with status progress
+ try {
+ new ProgressMonitorDialog(this.getShell()).run(true, false, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ monitor.beginTask("Downloading latest example categories...", IProgressMonitor.UNKNOWN);
+
+ AsposeMavenProjectManager.initialize(null);
+ AsposeJavaAPI component = AsposeCellsJavaAPI.initialize(AsposeMavenProjectManager.getInstance());
+ component.checkAndUpdateRepo();
+
+ monitor.done();
+ }
+ });
+ } catch (InvocationTargetException | InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void initControls() {
+
+ downloadExamplesRepo();
+
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ URI path = null;
+ try {
+ for (IProject project : projects) {
+ path = project.getDescription().getLocationURI();
+ if (path != null) {
+ cbProject.add(project.getDescription().getName());
+ cbProject.setData(project.getDescription().getName(), project);
+ }
+ }
+ cbProjectDecoration.hide();
+ setPageComplete(true);
+ if (cbProject.getItemCount() == 0) {
+ cbProject.add(AsposeConstants.API_PROJECT_NOT_FOUND);
+ cbProjectDecoration.show();
+ setPageComplete(false);
+ }
+
+ cbProject.select(0);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void initDecorators() {
+ FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault()
+ .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+
+ cbProjectDecoration = new ControlDecoration(cbProject, SWT.TOP | SWT.RIGHT);
+ cbProjectDecoration.setImage(fieldDecoration.getImage());
+ cbProjectDecoration.setDescriptionText("Please first create a Maven project");
+ cbProjectDecoration.hide();
+
+ cbVersionDecoration = new ControlDecoration(cbVersion, SWT.TOP | SWT.RIGHT);
+ cbVersionDecoration.setImage(fieldDecoration.getImage());
+ cbVersionDecoration.setDescriptionText(
+ "Please first add maven dependency of " + AsposeConstants.API_NAME + " for java API");
+ cbVersionDecoration.hide();
+
+ examplesTreeDecoration = new ControlDecoration(examplesTree, SWT.TOP | SWT.RIGHT);
+ examplesTreeDecoration.setImage(fieldDecoration.getImage());
+ examplesTreeDecoration.setDescriptionText("Please select one example category");
+ examplesTreeDecoration.hide();
+ }
+
+ private void onProjectModify() {
+ try {
+ cbVersion.removeAll();
+ IProject selectedProject = (IProject) cbProject.getData(cbProject.getText());
+ if (selectedProject != null) {
+ String versionNo = AsposeMavenProjectManager.getInstance().getDependencyVersionFromPOM(
+ selectedProject.getDescription().getLocationURI(), AsposeConstants.API_MAVEN_DEPENDENCY);
+ cbVersionDecoration.hide();
+ setPageComplete(true);
+ if (versionNo == null) {
+ cbVersionDecoration.show();
+ setPageComplete(false);
+ }
+ if (versionNo == null) {
+ versionNo = AsposeConstants.API_DEPENDENCY_NOT_FOUND;
+ }
+ cbVersion.add(versionNo);
+ cbVersion.select(0);
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ private void onVersionModify() {
+ try {
+ examplesTree.removeAll();
+ if (!cbVersion.getText().equals(AsposeConstants.API_DEPENDENCY_NOT_FOUND)) {
+ IProject selectedProject = (IProject) cbProject.getData(cbProject.getText());
+ if (selectedProject != null) {
+ AsposeMavenProjectManager.initialize(new File(selectedProject.getDescription().getLocationURI()));
+ AsposeJavaAPI component = AsposeCellsJavaAPI.initialize(AsposeMavenProjectManager.getInstance());
+ populateExamplesTree(component);
+ examplesTreeDecoration.show();
+ setPageComplete(false);
+ }
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void onTreeSelection() {
+ examplesTreeDecoration.show();
+ setPageComplete(false);
+ TreeItem[] selectedItems = examplesTree.getSelection();
+ if (selectedItems[0].getParentItem() != null && selectedItems[0].getItemCount() > 0) {
+ examplesTreeDecoration.hide();
+ setPageComplete(true);
+ }
+ }
+
+ /**
+ *
+ * @param asposeComponent
+ * @param top
+ * @param panel
+ */
+ public void populateExamplesTree(AsposeJavaAPI asposeComponent) {
+ String examplesFullPath = asposeComponent.getLocalRepositoryPath() + File.separator
+ + AsposeConstants.GITHUB_EXAMPLES_SOURCE_LOCATION;
+ File directory = new File(examplesFullPath);
+ examplesTree.removeAll();
+ Queue