[Esbox-commits] r193 - trunk/org.indt.esbox.python.ui/src/org/indt/esbox/python/ui/wizards
pauloromulo at garage.maemo.org
pauloromulo at garage.maemo.org
Mon Oct 29 22:13:42 EET 2007
Author: pauloromulo
Date: 2007-10-29 22:13:41 +0200 (Mon, 29 Oct 2007)
New Revision: 193
Modified:
trunk/org.indt.esbox.python.ui/src/org/indt/esbox/python/ui/wizards/ESboxPythonMainWizardPage.java
Log:
only python projects are added in the wizard templates list for Pydev projects
Modified: trunk/org.indt.esbox.python.ui/src/org/indt/esbox/python/ui/wizards/ESboxPythonMainWizardPage.java
===================================================================
--- trunk/org.indt.esbox.python.ui/src/org/indt/esbox/python/ui/wizards/ESboxPythonMainWizardPage.java 2007-10-29 19:11:21 UTC (rev 192)
+++ trunk/org.indt.esbox.python.ui/src/org/indt/esbox/python/ui/wizards/ESboxPythonMainWizardPage.java 2007-10-29 20:13:41 UTC (rev 193)
@@ -53,6 +53,7 @@
import org.indt.esbox.core.maemosdk.MaemoSDKInfo;
import org.indt.esbox.core.platform.PlatformEngine;
import org.indt.esbox.core.platform.PlatformInfo;
+import org.indt.esbox.python.ui.PythonUIActivator;
import org.indt.esbox.ui.ESboxConfigHandler;
import org.indt.esbox.ui.UIActivator;
import org.indt.esbox.ui.wizards.ESboxProjectContentsArea;
@@ -60,15 +61,12 @@
public class ESboxPythonMainWizardPage extends WizardPage implements IWizardItemsListListener {
- private static final Image IMG_CATEGORY = CPluginImages.get(CPluginImages.IMG_OBJS_SEARCHFOLDER);
private static final Image IMG_ITEM = CPluginImages.get(CPluginImages.IMG_OBJS_VARIABLE);
private static final Image IMG_MAEMO_SDK = CPluginImages.get(CPluginImages.IMG_OBJS_LIBRARY);
private static final Image IMG_PLATFORM = CPluginImages.get(CPluginImages.IMG_VIEW_BUILD);
- private static final String AUTOMAKE_PROJECT_TYPE = UIActivator.PLUGIN_ID + ".projectType.automake";
- private static final String MAKEFILE_PROJECT_TYPE = UIActivator.PLUGIN_ID + ".projectType.makefile";
- private static final String CPP_PROJECT_TYPE = UIActivator.PLUGIN_ID + ".projectType.cpp";
-
+ private static final String PYTHON_PROJECT_TYPE = PythonUIActivator.PLUGIN_ID + ".projectType.python";
+
public static final String PAGE_ID = "org.indt.esbox.ui.wizard.ProjectWizardPage"; //$NON-NLS-1$
public static final String DESC = "EntryDescriptor"; //$NON-NLS-1$
private static final String HELP_CTX = "org.eclipse.ui.ide.new_project_wizard_page_context"; //$NON-NLS-1$
@@ -243,42 +241,21 @@
}
private void fillProjectTypeTree() {
- TreeItem tipExe = new TreeItem(treeProjectTypes, SWT.NONE);
- tipExe.setText("Automake Projects");
- tipExe.setImage(IMG_CATEGORY);
-
- TreeItem tipMake = new TreeItem(treeProjectTypes, SWT.NONE);
- tipMake.setText("Makefile Projects");
- tipMake.setImage(IMG_CATEGORY);
-
- TreeItem tipCpp = new TreeItem(treeProjectTypes, SWT.NONE);
- tipCpp.setText("C++ Hildon Projects");
- tipCpp.setImage(IMG_CATEGORY);
-
Template[] templates = UIActivator.getDefault().getTemplates();
+ System.out.println(PYTHON_PROJECT_TYPE);
for (int i = 0; i < templates.length; i++) {
- Template template = templates[i];
- if (isESboxTemplate(template.getTemplateInfo().getTemplateId())) {
- String projectType = template.getTemplateInfo().getProjectType();
- TreeItem tip = null;
- if (projectType.equals(AUTOMAKE_PROJECT_TYPE)) {
- tip = new TreeItem(tipExe, SWT.NONE);
- } else if (projectType.equals(MAKEFILE_PROJECT_TYPE)) {
- tip = new TreeItem(tipMake, SWT.NONE);
- } else if (projectType.equals(CPP_PROJECT_TYPE)) {
- tip = new TreeItem(tipCpp, SWT.NONE);
- }
+ Template template = templates[i];
+ String projectType = template.getTemplateInfo().getProjectType();
+ TreeItem tip = null;
+ if (projectType.equals(PYTHON_PROJECT_TYPE)) {
+ tip = new TreeItem(treeProjectTypes, SWT.NONE);
tip.setText(template.getLabel());
- tip.setData(template);
- tip.setImage(IMG_ITEM);
- }
+ tip.setData(template);
+ tip.setImage(IMG_ITEM);
+ }
}
- }
+ }
- private boolean isESboxTemplate(String template) {
- return template.startsWith(UIActivator.PLUGIN_ID);
- }
-
/**
* Get an error reporter for the receiver.
* @return IErrorMessageReporter
More information about the Esbox-commits
mailing list