Commit 8bc062bc authored by Adam Knapp's avatar Adam Knapp
Browse files

Disable TPD export for Titan Java projects (Bug 572731)



Change-Id: Ib3bb29b7239fb31af9e3a68d35f144c39091d55e
Signed-off-by: Adam Knapp's avatarAdam Knapp <adam.knapp@ericsson.com>
parent 8eb8d0a4
......@@ -19,6 +19,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.titan.common.logging.ErrorReporter;
import org.eclipse.titan.designer.core.TITANJavaBuilder;
import org.eclipse.titan.designer.preferences.PreferenceConstants;
import org.eclipse.titan.designer.preferences.pages.ExportOptionsPage;
import org.eclipse.titan.designer.productUtilities.ProductConstants;
......@@ -85,6 +86,10 @@ public final class TITANAutomaticProjectExporter {
if (!automaticExportRequested()) {
return false;
}
if (TITANJavaBuilder.isBuilderEnabled(project)) {
return false;
}
final TITANProjectExporter exporter = new TITANProjectExporter(project);
exporter.setProjectFileFromLoadLocation();
......
......@@ -23,9 +23,11 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.titan.common.logging.ErrorReporter;
import org.eclipse.titan.common.path.TITANPathUtilities;
import org.eclipse.titan.designer.core.TITANJavaBuilder;
import org.eclipse.titan.designer.properties.data.ProjectBuildPropertyData;
import org.eclipse.ui.IExportWizard;
import org.eclipse.ui.IWorkbench;
......@@ -38,6 +40,7 @@ public class TITANProjectExportWizard extends Wizard implements IExportWizard {
private static final String NEWPROJECT_WINDOWTITLE = "Export TITAN Project to a TITAN Project descriptor file";
private static final String NEWPROJECT_TITLE = "Create a TITAN Project Descriptor File";
private static final String NEWPROJECT_DESCRIPTION = "Create a TITAN Project Descriptor (tpd) file in the workspace or in an external location";
private static final String TITAN_JAVA_PROJECT_ERROR_MESSAGE = "TPD export of Titan Java projects are not supported!";
private IStructuredSelection selection;
private IProject project = null;
......@@ -146,6 +149,22 @@ public class TITANProjectExportWizard extends Wizard implements IExportWizard {
addPage(optionsPage);
}
@Override
public boolean canFinish() {
if (project == null || TITANJavaBuilder.isBuilderEnabled(project)) {
mainPage.setErrorMessage(TITAN_JAVA_PROJECT_ERROR_MESSAGE);
optionsPage.setErrorMessage(TITAN_JAVA_PROJECT_ERROR_MESSAGE);
return false;
}
for (IWizardPage page : getPages()) {
if (!page.isPageComplete()) {
return false;
}
}
return true;
}
@Override
public boolean performFinish() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment